﻿/* =========================================================
   CREATE PACKAGE PAGE
   ========================================================= */

.edit-package-page {
    min-height: 80vh;
    padding: 40px 18px 70px;
    color: #142e59;
    background: radial-gradient( circle at 95% 0, rgba(255, 120, 23, .09), transparent 25% ), #f3f6fb;
    box-sizing: border-box;
}

.edit-package-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.edit-package-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
    padding: 28px 30px;
    color: #fff;
    background: radial-gradient( circle at top right, rgba(255, 132, 38, .40), transparent 34% ), linear-gradient(135deg, #102950, #193f73);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(17, 42, 84, .18);
}

.edit-package-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    color: #dce8f7 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

    .edit-package-back:hover {
        color: #ffad71 !important;
        transform: translateX(-3px);
    }

.edit-package-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #ffad71;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.edit-package-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
}

.edit-package-header p {
    margin: 8px 0 0;
    color: #d5e2f3;
    font-size: 14px;
}

.edit-package-reference {
    display: grid;
    min-width: 105px;
    min-height: 75px;
    padding: 12px;
    place-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 14px;
    text-align: center;
    box-sizing: border-box;
}

    .edit-package-reference span {
        display: block;
        margin-bottom: 5px;
        color: #c8d8ed;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .edit-package-reference strong {
        color: #ff9d55;
        font-size: 21px;
    }

/* =========================================================
   LAYOUT AND CARDS
   ========================================================= */

.edit-package-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 22px;
}

.edit-package-main,
.edit-package-sidebar {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.edit-form-card,
.edit-sidebar-card {
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(20, 45, 84, .07);
}

.edit-form-card {
    padding: 25px;
}

.edit-sidebar-card {
    padding: 20px;
}

.edit-card-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 17px;
    border-bottom: 1px solid #e7ecf3;
}

.edit-heading-icon {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border-radius: 12px;
    font-size: 16px;
}

.basic-icon {
    color: #d9610c;
    background: #fff0e5;
}

.type-icon {
    color: #315fa8;
    background: #e9f2ff;
}

.includes-icon {
    color: #16834a;
    background: #e6f9ee;
}

.price-icon {
    color: #856100;
    background: #fff4ca;
}

.edit-card-heading h2 {
    margin: 0;
    color: #142e59;
    font-size: 19px;
}

.edit-card-heading p {
    margin: 4px 0 0;
    color: #718096;
    font-size: 12px;
}

/* =========================================================
   FORM FIELDS
   ========================================================= */

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.edit-field {
    margin-bottom: 18px;
}

    .edit-field:last-child {
        margin-bottom: 0;
    }

    .edit-field label {
        display: block;
        margin-bottom: 7px;
        color: #314866;
        font-size: 12px;
        font-weight: 800;
    }

.required-mark {
    color: #dc3545;
}

.edit-input-wrap {
    position: relative;
}

    .edit-input-wrap > i {
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 14px;
        color: #8592a5;
        transform: translateY(-50%);
        pointer-events: none;
    }

    .edit-input-wrap input,
    .edit-input-wrap select,
    .edit-field > input,
    .edit-field textarea {
        width: 100% !important;
        color: #173565 !important;
        background: #f9fbfe !important;
        border: 1px solid #ced8e6 !important;
        border-radius: 11px !important;
        box-sizing: border-box !important;
        font-family: inherit !important;
        font-size: 13px !important;
        transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
    }

    .edit-input-wrap input,
    .edit-input-wrap select,
    .edit-field > input {
        height: 47px !important;
    }

    .edit-input-wrap input,
    .edit-input-wrap select {
        padding: 0 14px 0 41px !important;
    }

.edit-field > input {
    padding: 0 14px !important;
}

.edit-field textarea {
    min-height: 135px !important;
    padding: 13px 14px !important;
    line-height: 1.6 !important;
    resize: vertical !important;
}

    .edit-input-wrap input:focus,
    .edit-input-wrap select:focus,
    .edit-field > input:focus,
    .edit-field textarea:focus {
        background: #fff !important;
        border-color: #ff7817 !important;
        outline: none !important;
        box-shadow: 0 0 0 4px rgba(255, 120, 23, .11) !important;
    }

.edit-field-help {
    margin-top: 6px;
    color: #8793a3;
    font-size: 10px;
}

.edit-field-error {
    display: block;
    margin-top: 5px;
    color: #c62828;
    font-size: 11px;
}

.edit-validation-summary {
    margin-bottom: 20px;
    padding: 14px 16px;
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    font-size: 12px;
}

    .edit-validation-summary:empty {
        display: none;
    }

    .edit-validation-summary ul {
        margin: 0;
        padding-left: 18px;
    }

/* =========================================================
   INFORMATION BOXES
   ========================================================= */

.product-type-information,
.includes-example,
.pricing-information {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.55;
}

.product-type-information {
    color: #285381;
    background: #edf6ff;
    border: 1px solid #cae0f6;
}

    .product-type-information i {
        color: #2775bd;
    }

.includes-example,
.pricing-information {
    margin-top: 8px;
    color: #67510f;
    background: #fff9df;
    border: 1px solid #efdf9b;
}

    .includes-example i,
    .pricing-information i {
        color: #bf8900;
    }

/* =========================================================
   PRICE INPUTS
   ========================================================= */

.edit-price-input {
    display: flex;
    align-items: stretch;
}

    .edit-price-input > span {
        display: grid;
        min-width: 58px;
        place-items: center;
        color: #6f540c;
        background: #fff5d2;
        border: 1px solid #e7d58e;
        border-right: 0;
        border-radius: 11px 0 0 11px;
        font-size: 11px;
        font-weight: 900;
    }

    .edit-price-input input {
        width: 100% !important;
        height: 47px !important;
        padding: 0 14px !important;
        color: #173565 !important;
        background: #fff !important;
        border: 1px solid #ced8e6 !important;
        border-radius: 0 11px 11px 0 !important;
        box-sizing: border-box !important;
        font: inherit !important;
    }

        .edit-price-input input:focus {
            border-color: #ff7817 !important;
            outline: none !important;
            box-shadow: 0 0 0 4px rgba(255, 120, 23, .11) !important;
        }

/* =========================================================
   SIDEBAR HEADINGS AND IMAGE
   ========================================================= */

.edit-sidebar-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e7ecf3;
}

    .edit-sidebar-heading i {
        color: #ff7817;
    }

    .edit-sidebar-heading h2 {
        margin: 0;
        color: #142e59;
        font-size: 17px;
    }

.edit-image-preview {
    position: relative;
    height: 190px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #edf2f7;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
}

    .edit-image-preview img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .edit-image-preview > span {
        position: absolute;
        right: 10px;
        bottom: 10px;
        padding: 6px 9px;
        color: #fff;
        background: rgba(14, 35, 68, .80);
        border-radius: 7px;
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
    }

/* =========================================================
   FILE UPLOAD
   ========================================================= */

.package-file-upload {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 14px !important;
    background: #f8faff !important;
    border: 1px dashed #aebdd0 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: background .18s ease, border-color .18s ease !important;
}

    .package-file-upload:hover {
        background: #fff5eb !important;
        border-color: #ff8a32 !important;
    }

    .package-file-upload input {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

.file-upload-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    color: #e6650b;
    background: #fff0e4;
    border-radius: 10px;
    font-size: 16px;
}

.package-file-upload strong,
.package-file-upload small {
    display: block;
}

.package-file-upload strong {
    color: #173565;
    font-size: 12px;
}

.package-file-upload small {
    margin-top: 3px;
    color: #7b8798;
    font-size: 9px;
}

.image-or-divider {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0;
    color: #8994a3;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

    .image-or-divider::before,
    .image-or-divider::after {
        height: 1px;
        flex: 1;
        content: "";
        background: #e1e7ef;
    }

/* =========================================================
   VISIBILITY SWITCHES
   ========================================================= */

.edit-switch-option {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 11px !important;
    padding: 13px !important;
    background: #f8faff !important;
    border: 1px solid #e1e8f2 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
}

    .edit-switch-option:last-child {
        margin-bottom: 0 !important;
    }

.edit-switch-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.switch-option-icon {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    border-radius: 10px;
}

.price-switch {
    color: #176ea0;
    background: #e2f5ff;
}

.popular-switch {
    color: #9b7100;
    background: #fff4c9;
}

.edit-switch-content strong,
.edit-switch-content small {
    display: block;
}

.edit-switch-content strong {
    color: #173565;
    font-size: 12px;
}

.edit-switch-content small {
    margin-top: 3px;
    color: #7b8798;
    font-size: 9px;
}

.edit-switch-option > input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.edit-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
    background: #c8d1dd;
    border-radius: 999px;
    transition: background .2s ease;
}

    .edit-toggle > span {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 18px;
        height: 18px;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
        transition: transform .2s ease;
    }

.edit-switch-option > input:checked + .edit-toggle {
    background: #1ca459;
}

    .edit-switch-option > input:checked + .edit-toggle > span {
        transform: translateX(20px);
    }

/* =========================================================
   SAVE ACTIONS
   ========================================================= */

.save-card {
    position: sticky;
    top: 90px;
}

.edit-save-button,
.edit-cancel-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 45px !important;
    padding: 10px 16px !important;
    border-radius: 11px !important;
    box-sizing: border-box !important;
    font: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.edit-save-button {
    margin-bottom: 9px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #ff8b32, #ff6810) !important;
    border: 0 !important;
    box-shadow: 0 9px 20px rgba(255, 104, 16, .25) !important;
}

    .edit-save-button:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 13px 25px rgba(255, 104, 16, .34) !important;
    }

.edit-cancel-button {
    color: #53647b !important;
    background: #edf1f6 !important;
    border: 1px solid #d7dfe9 !important;
}

    .edit-cancel-button:hover {
        color: #173565 !important;
        background: #e2e8f0 !important;
    }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .edit-package-layout {
        grid-template-columns: 1fr;
    }

    .edit-package-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .save-card {
        position: static;
    }
}

@media (max-width: 650px) {
    .edit-package-page {
        padding: 25px 11px 50px;
    }

    .edit-package-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .edit-package-reference {
        min-height: auto;
        text-align: left;
    }

    .edit-form-grid,
    .edit-package-sidebar {
        grid-template-columns: 1fr;
    }

    .edit-form-card,
    .edit-sidebar-card {
        padding: 18px;
    }
}
