/* ============================================
   Sun Stories Account Pages — Plugin Styles
   ============================================ */

/* --- Scoped Design Tokens --- */
.ssc-account {
    --color-accent: #D8927C;
    --color-primary: #2D2420;
    --color-border: #F2E9DD;
    --color-bg: #FBFAF7;
    --color-white: #FFFFFF;
    --color-placeholder: #7F7F7F;
    --color-error: #FF383C;
    --color-text: #2D2420;
    --color-text-secondary: #2D2420;
    --color-link: #2D2420;
    --black-text: #000000;
    --font-sans: "Figtree", sans-serif;
    --font-serif: "Nanum Myeongjo", serif;
    --container-max: 1600px;
    --border-radius: 4px;
    --input-height: 48px;
    --transition: 0.2s ease;
}

/* --- Reset inside plugin scope --- */
.ssc-account *,
.ssc-account *::before,
.ssc-account *::after {
    box-sizing: border-box;
}

.ssc-account {
    font-family: var(--font-sans);
    color: var(--color-text);
    line-height: 1.6;
    max-width: var(--container-max);
    margin: 0 auto;
}

.ssc-account a {
    color: var(--color-link);
    text-decoration: underline;
    transition: opacity var(--transition);
}

.ssc-account a:hover {
    opacity: 0.75;
}

.ssc-account img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Account Layout (Sidebar + Main)
   ============================================ */

.ssc-account .account-layout {
    display: flex;
    gap: 39px;
    align-items: flex-start;
    padding: 24px 0 80px;
}

/* --- Sidebar --- */
.ssc-account .account-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.ssc-account .account-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ssc-account .account-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.ssc-account .account-nav-item:hover {
    background: var(--color-bg);
}

.ssc-account .account-nav-item.active {
    background: var(--color-bg);
    font-weight: 500;
}

.ssc-account .account-nav-item.nav-logout {
    color: var(--color-error);
}

.ssc-account .account-nav-item img,
.ssc-account .account-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- Mobile Account Dropdown (hidden on desktop) --- */
.ssc-account-dropdown {
    display: none;
}

/* --- Main Content --- */
.ssc-account .account-main {
    flex: 1;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    padding: 30px;
}

.ssc-account .account-section-title {
    font-size: 1.125rem;
    font-family: "Figtree", Sans-serif;
    font-weight: 500;
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 15px;
}

.ssc-account .mb-0 {
    margin-bottom: 0 !important;
}

.ssc-account .account-divider {
    border: none;
    margin: 30px 0 0 0;
}

/* ============================================
   Forms
   ============================================ */

.ssc-account .form-group {
    margin-bottom: 20px;
}

.ssc-account .form-group label {
    display: block;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 7px;
}

.ssc-account .form-input {
    width: 100%;
    height: var(--input-height);
    padding: 9px 0 9px 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--black-text);
    background: var(--color-white);
    border: 1px solid var(--color-primary);
    border-radius: 0;
    outline: none;
    transition: border-color var(--transition);
}

.ssc-account .form-input::placeholder {
    color: var(--color-placeholder);
    font-size: 1rem;
}

.ssc-account .form-input:focus {
    border-color: var(--color-accent);
}

.ssc-account .form-input.error {
    border-color: var(--color-error);
}

.ssc-account .disabled-input {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
}

/* --- Checkbox --- */
.ssc-account .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.ssc-account .checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.ssc-account .checkbox-group label {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1.5;
}

.ssc-account .ssc-form-row {
    display: flex;
    gap: 19px;
}

.ssc-account .ssc-form-row .form-group {
    flex: 1;
    min-width: 0;
}

.ssc-account .ssc-form-row-3 {
    display: flex;
    gap: 20px;
}

.ssc-account .ssc-form-row-3>.form-group {
    flex: 1;
    min-width: 0;
}

/* Password Input */
.ssc-account .input-wrapper {
    position: relative;
}

.ssc-account .input-wrapper .form-input {
    padding-right: 48px;
}

.ssc-account .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
}

.ssc-account .toggle-password svg {
    width: 20px;
    height: 20px;
}

.ssc-account .toggle-password:hover {
    color: var(--color-primary);
}

/* Phone Input */
.ssc-account .phone-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--color-primary);
    overflow: hidden;
}

.ssc-account .phone-group .country-code {
    width: 72px;
    min-width: 72px;
    height: var(--input-height);
    padding: 9px 12px 9px 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--black-text);
    background: var(--color-white);
    border: none;
    border-right: 1px solid var(--color-primary);
    border-radius: 0 !important;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%232D2420' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 16px 16px;
}

.ssc-account .phone-group .phone-input {
    flex: 1;
    height: var(--input-height);
    padding: 9px 0 9px 14px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-white);
    border: none !important;
    outline: none;
}

.ssc-account .phone-group .phone-input::placeholder {
    color: var(--color-placeholder);
    font-size: 1rem;
}

/* Buttons */
.ssc-account .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 11.5px 20px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
    border: 1px solid transparent;
    cursor: pointer;
    transition: opacity var(--transition), background-color var(--transition);
    text-decoration: none;
    line-height: 1;
}

.ssc-account .btn:hover {
    opacity: 0.85;
}

.ssc-account .btn-primary {
    width: 100%;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 400;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.ssc-account .btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: 0;
}

.ssc-account .form-actions-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

/* ============================================
   Profile Photo
   ============================================ */

.ssc-account .profile-photo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.ssc-account .profile-photo-inner-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    align-items: center;
}

.ssc-account .profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssc-account .profile-photo-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.ssc-account .profile-upload-link {
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    font-family: var(--font-sans);
    text-decoration: underline;
}

/* ============================================
   Orders List
   ============================================ */

.ssc-account .order-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 0;
    border-bottom: 1px solid var(--color-border);
}

.ssc-account .order-item:last-child {
    border-bottom: none;
}

.ssc-account .order-item-left {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.ssc-account .order-id {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    font-family: 'Figtree', sans-serif;
    margin-bottom: 2px;
    margin-top: 0;
}

.ssc-account .order-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.ssc-account .order-total {
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 10px;
    color: var(--color-primary);
}

.ssc-account .order-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.ssc-account .order-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 127%;
}

.ssc-account .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ssc-account .status-arriving .status-dot {
    border: 1px solid #27C840;
}

.ssc-account .status-delivered .status-dot {
    background: #27C840;
}

.ssc-account .status-cancelled .status-dot {
    background: var(--color-error);
}

.ssc-account .order-view-link {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-primary);
    text-decoration: underline;
    border: none !important;
    padding: 0;
    background: transparent;
}


@media (max-width: 768px) {

    .ssc-account .order-total {
        margin-top: 15px;
    }

}



/* ============================================
   Addresses
   ============================================ */

.ssc-account .address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 17px;
}

.ssc-account .add-address-link {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: clamp(0.875rem, 0.824rem + 0.196vw, 1rem);
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    padding-left: 2px;
}

.ssc-account .add-address-link svg {
    width: 18px;
}

.ssc-account .add-address-link:hover {
    opacity: 0.7;
}

.ssc-account .address-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--color-bg);
    padding: 20px;
    margin-bottom: 15px;
}

.ssc-account .address-card:last-child {
    margin-bottom: 0;
}

.ssc-account .address-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ssc-account .address-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ssc-account .address-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.ssc-account .address-tag {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0px 5px;
    text-transform: capitalize;
    color: #D8927C;
    border: 1px solid #D8927C;
}

.ssc-account .address-detail {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 18px;
}

.ssc-account .address-detail b {
    color: var(--color-text);
    font-weight: 600;
}

.ssc-account .address-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.ssc-account .address-default-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    background-color: var(--color-border);
    color: var(--color-primary);
    white-space: nowrap;
}


@media (max-width: 768px) {
    .ssc-account .address-header {
        margin-bottom: 15px;
    }

    .ssc-account .add-address-link svg {
        width: 13px;
        margin-top: -1px;
    }

    .ssc-account .address-card-top {
        margin-bottom: 0;
    }
}

/* ============================================
   Notifications
   ============================================ */


div[data-panel="notifications"] .account-section-title {
    margin-bottom: 30px;
}


.ssc-account .notif-preferences-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.ssc-account .notif-pref-list {
    margin-bottom: 30px;
}

#ssc-notifications-form .btn-primary {
    width: auto;
    padding: 12px 20px;
}

.ssc-account .notif-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    margin-bottom: 2px;
    background-color: var(--color-bg);
}

.ssc-account .notif-pref-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* Toggle Switch */
.ssc-account .toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.ssc-account .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ssc-account .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-white);
    border: 2px solid #969090;
    border-radius: 0;
    transition: var(--transition);
}

.ssc-account .toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #969090;
    border-radius: 0;
    transition: var(--transition);
}

.ssc-account .toggle-switch input:checked+.toggle-slider {
    background-color: var(--color-white);
    border-color: var(--color-primary);
}

.ssc-account .toggle-switch input:checked+.toggle-slider::before {
    background-color: var(--color-primary);
    transform: translateX(20px) translateY(-50%);
}

/* ============================================
   Billing & Payment
   ============================================ */

.ssc-account .payment-card-widget {
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    padding: 20px;
    max-width: 410px;
}

.ssc-account .payment-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ssc-account .payment-card-type {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ssc-account .payment-card-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.ssc-account .payment-card-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.ssc-account .horizontal-line {
    margin: 30px 0;
    background-color: var(--color-bg);
    height: 1px;
}

/* Transaction Table */
.ssc-account .transaction-table {
    width: 100%;
    border: 1px solid var(--color-border);
    border-collapse: collapse;
}

.ssc-account .transaction-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--black-text);
    padding: 6px 20px;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border) !important;
    background: var(--color-bg);
}

.ssc-account .transaction-table td {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--black-text);
    padding: 10px 20px;
    border: none;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    line-height: 1;
    background-color: transparent;
}

.ssc-account .transaction-table th:last-child,
.ssc-account .transaction-table td:last-child {
    text-align: center;
    width: 80px;
}

.ssc-account .download-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: opacity var(--transition);
}

.ssc-account .download-btn:hover {
    opacity: 0.6;
}

/* Billing Status Badges */
.ssc-account .billing-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 6px;
    white-space: nowrap;
    display: inline-block;
}

.ssc-account .billing-status-completed {
    color: #27C840;
    background: rgba(39, 200, 64, 0.1);
}

.ssc-account .billing-status-active {
    color: #D8927C;
    background: rgba(216, 146, 124, 0.1);
}

.ssc-account .billing-status-cancelled {
    color: var(--color-error);
    background: rgba(255, 56, 60, 0.1);
}

.ssc-account .billing-status-refunded {
    color: var(--color-error);
    background: rgba(255, 56, 60, 0.1);
}

/* Transaction Mobile Cards (hidden on desktop) */
.ssc-account .transaction-mobile-cards {
    display: none;
}

.ssc-account .transaction-card {
    background: #fff;
    border: 1px solid #F2E9DD;
    padding: 10px 20px;
    margin-bottom: 10px;
}

.ssc-account .transaction-card:last-child {
    margin-bottom: 0;
}

.ssc-account .transaction-card-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ssc-account .transaction-card-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssc-account .transaction-card-col-right {
    text-align: right;
    align-items: flex-end;
}

.ssc-account .transaction-card-label {
    font-family: "Figtree", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    color: var(--black-text);
}

.ssc-account .transaction-card-value {
    font-family: "Figtree", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 18px;
    color: var(--black-text);
}

.ssc-account .transaction-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.ssc-account .transaction-card-status {
    font-family: "Figtree", sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 18px;
    padding: 2px 6px;
    display: inline-block;
    width: fit-content;
}

.ssc-account .transaction-card-invoice-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.ssc-account .transaction-card-invoice-btn img {
    width: 20px;
    height: 20px;
}

.ssc-account .transaction-card-invoice-btn span {
    font-family: "Figtree", sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    color: var(--black-text);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ssc-account .transaction-table {
        display: none;
    }

    .ssc-account .transaction-mobile-cards {
        display: block;
    }
}

/* ============================================
   Dropdown Menu (3-dot)
   ============================================ */

.ssc-account .menu-btn-wrap {
    position: relative;
}

.ssc-account .address-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text);
    transition: background var(--transition);
    padding: 0;
}

div[data-panel="addresses"] .address-menu-btn img {
    width: 24px;
}

.ssc-account .address-menu-btn:hover {
    background: var(--color-bg);
}

.ssc-account .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ssc-account .dropdown-menu.open {
    display: block;
}

.ssc-account .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
    background: transparent;
    width: 100%;
    border: none;
}

.ssc-account .dropdown-item:last-child {
    border-bottom: none;
}

.ssc-account .dropdown-item:hover {
    background: var(--color-bg);
    opacity: 1;
}

.ssc-account .dropdown-item-delete {
    color: var(--color-error);
}

/* --- Address Type Radio Group --- */
.ssc-account .addr-type-label {
    font-size: 1rem;
    font-weight: 500;
    color: #2d2420;
    margin-bottom: 20px;
    font-family: "Figtree", sans-serif;
}

.ssc-account .addr-radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ssc-account .addr-radio-label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 1rem;
    font-family: "Figtree", sans-serif;
    color: #2d2420;
    cursor: pointer;
    white-space: nowrap;
}

.ssc-account .addr-radio-label input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    border: 1px solid #292D32;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
}

.ssc-account .addr-radio-label input[type="radio"]:checked {
    background: #292D32;
}

.ssc-account .addr-radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 8px;
}

/* Address Form Grid */
.ssc-account .addr-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.ssc-account .addr-form-grid .form-group {
    margin-bottom: 0;
}

.ssc-account .addr-col-half {
    flex: 1 1 calc(50% - 7.5px);
    min-width: 0;
}

.ssc-account .addr-col-full {
    flex: 1 1 100%;
    min-width: 0;
}

.ssc-account .addr-col-third {
    flex: 1 1 calc(33.333% - 10px);
    min-width: 0;
}

/* --- Global: Override Elementor default button hover & border-radius --- */
.ssc-account button,
.ssc-account [type="button"],
.ssc-account [type="submit"],
.ssc-account .btn {
    border-radius: 0 !important;
}

.ssc-account button:hover,
.ssc-account button:focus,
.ssc-account [type="button"]:hover,
.ssc-account [type="button"]:focus,
.ssc-account [type="submit"]:hover,
.ssc-account [type="submit"]:focus {
    background-color: inherit !important;
    color: inherit !important;
    text-decoration: none !important;
}

.ssc-account .btn-primary:hover,
.ssc-account .btn-primary:focus {
    background-color: var(--color-primary) !important;
    color: var(--color-white) !important;
    border-color: var(--color-primary) !important;
}

.ssc-account .btn-outline:hover,
.ssc-account .btn-outline:focus {
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.ssc-account .download-btn:hover,
.ssc-account .download-btn:focus {
    background: none !important;
    color: var(--color-text) !important;
}

.ssc-account .address-menu-btn:hover,
.ssc-account .address-menu-btn:focus {
    background: var(--color-bg) !important;
    color: var(--color-text) !important;
}

/* ============================================
   Tab Panels
   ============================================ */

.ssc-account .account-tab-panel {
    animation: sscAccountFadeIn 0.25s ease;
}

@keyframes sscAccountFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Spinner */
.ssc-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sscBtnSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes sscBtnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {


    .ssc-account .account-layout {
        flex-direction: column;
        gap: 20px;
        padding-top: 20px;
        padding-bottom: 60px;
    }

    .mb0-sm {
        margin-bottom: 0 !important;
    }

    .ssc-account .account-sidebar {
        display: none;
    }

    .ssc-account .account-main {
        width: 100%;
        padding: 20px;
    }

    .ssc-account-dropdown {
        display: block;
        width: 100%;
        position: relative;
        font-family: "Figtree", sans-serif;
    }

    .ssc-account-dropdown-wrapper {
        border: 1px solid #F2E9DD;
        background: #fff;
        position: relative;
    }

    .ssc-account-dropdown-trigger {
        background-color: #FBFAF7;
        cursor: pointer;
    }

    .ssc-account-dropdown-header {
        padding: 12px 10px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .ssc-account-dropdown-trigger .ssc-account-dropdown-header {
        justify-content: flex-start;
    }

    .ssc-account-dropdown-arrow {
        margin-left: auto;
        display: flex;
        align-items: center;
        transition: transform 0.2s ease;
    }

    .ssc-account-dropdown-wrapper.is-open .ssc-account-dropdown-arrow svg {
        transform: rotate(180deg);
    }

    .ssc-account-dropdown-text {
        font-family: "Figtree", sans-serif;
        font-size: 1rem;
        font-weight: 500;
        color: #000;
    }

    .ssc-account-dropdown-icon {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .ssc-account-dropdown-icon svg {
        width: 24px;
        height: 24px;
    }

    .ssc-account-dropdown-options {
        display: none;
        position: absolute;
        top: 100%;
        left: -1px;
        right: -1px;
        background: #fff;
        z-index: 100;
        box-shadow: 0 4px 6px 0px rgba(0, 0, 0, 0.25);
        border: 1px solid #F2E9DD;
        border-top: none;
    }

    .ssc-account-dropdown-wrapper.is-open .ssc-account-dropdown-options {
        display: block;
    }

    .ssc-account-dropdown-item {
        cursor: pointer;
        border-bottom: 1px solid #F2E9DD;
        transition: background-color 0.2s;
    }

    .ssc-account-dropdown-item:last-child {
        border-bottom: none;
    }

    .ssc-account-dropdown-item:hover {
        background-color: #FBFAF7;
    }

    .ssc-account-dropdown-logout .ssc-account-dropdown-text {
        color: #FF383C;
    }

    .ssc-account-dropdown-logout .ssc-account-dropdown-icon svg {
        stroke: #FF383C;
    }

    .ssc-account .ssc-form-row-3 {
        flex-direction: column;
        gap: 0;
    }

    .ssc-account .profile-photo-inner-row {
        gap: 0;
    }

    .ssc-account .order-item {
        flex-direction: column;
        gap: 12px;
    }

    .ssc-account .order-item-right {
        align-items: flex-end;
        gap: 15px;
        margin-top: -35px;
        align-self: flex-end;
    }

    .ssc-account .order-status {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.875rem;
        color: var(--color-text-secondary);
        width: 100%;
        /* margin-top: -23px; */
        justify-content: flex-end;
        padding-left: 50%;
    }

    div[data-panel="my-orders"] .order-status {
        padding-left: 0;
    }

    #ssc-order-detail-content .order-status {
        margin-top: -23px;
    }



    .ssc-account .order-product {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ssc-account .payment-card-widget {
        max-width: 100%;
    }

    #ssc-notifications-form .btn-primary {
        width: 100%;
    }

    .ssc-account .address-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #ssc-add-address-form .ssc-form-row,
    #ssc-edit-address-form .ssc-form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    #ssc-add-address-form .ssc-form-row .form-group,
    #ssc-edit-address-form .ssc-form-row .form-group {
        width: 100%;
    }

    .ssc-account .addr-form-grid {
        gap: 20px;
    }

    .ssc-account .addr-col-half {
        flex: 1 1 calc(50% - 10px);
    }

    .ssc-account .addr-col-half:nth-child(3),
    .ssc-account .addr-col-half:nth-child(4) {
        flex: 1 1 100%;
    }

    .ssc-account .addr-col-third {
        flex: 1 1 100%;
    }

    #ssc-add-address-form .form-actions-right .btn,
    #ssc-edit-address-form .form-actions-right .btn {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* ============================================
   Order Detail
   ============================================ */

.ssc-account .order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}

.ssc-account .go-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-sans);
    text-decoration: none;
}

.ssc-account .arrow-back {
    width: 22px;
}

.ssc-account .order-detail-section-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    padding: 15px 0;
    margin: 0;
}

.ssc-account .order-product {
    display: flex;
    gap: 16px;
    padding: 30px 0 30px 0;
    border-bottom: 1px solid var(--color-border);
}

.ssc-account .order-product:first-of-type {
    padding-top: 0;
}

.ssc-account .order-product-image {
    width: 66px;
    height: 66px;
    object-fit: cover;
    background: #d3d3d330;
}

.ssc-account .order-product-info {
    flex: 1;
}

.ssc-account .order-product-name {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--color-primary);
    font-family: var(--font-serif);
    margin-top: 0;
    line-height: 130%;
}

.ssc-account .order-product-meta {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary, #2D2420);
    margin-bottom: 5px;
}

.ssc-account .order-product-price {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
}

/* Tracking Bar */
.ssc-account .tracking-bar {
    display: flex;
    align-items: center;
    padding: 0 0 50px;
    border-bottom: 1px solid var(--color-border);
}

.ssc-account .tracking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.ssc-account .tracking-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 4px solid var(--color-border);
}

.ssc-account .tracking-step.completed .tracking-dot {
    border-color: #27C840;
}

/* ------------------------------------------------
   Photo Upload (Refund Form)
------------------------------------------------ */
.ssc-account .upload-hint {
    font-weight: 300;
    /* font-size: 0.8125rem; */
    color: var(--color-text-secondary, #666);
}

.ssc-account .photo-upload-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.ssc-account #ssc-refund-photo-row #ssc-refund-upload-box {
    margin-bottom: 0;
}

.ssc-account .photo-upload-box {
    width: 150px;
    height: 150px;
    border: 1px dashed #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    gap: 8px;
}

.ssc-account .photo-upload-box .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.ssc-account .photo-upload-box svg {
    width: 28px;
    height: 28px;
}

.ssc-account .photo-upload-box span {
    font-size: 1rem;
    font-weight: 500;
}

.ssc-account .photo-upload-box small {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.5);
}

.ssc-account .photo-preview {
    position: relative;
    width: 150px;
    height: 150px;
    overflow: hidden;
}

.ssc-account .photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssc-account .photo-remove {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid #FF383C;
}

.ssc-account .photo-remove img {
    width: 16px;
    height: 16px;
    display: block;
}

.ssc-account .photo-remove:hover,
.ssc-account .photo-remove:focus,
.ssc-account .photo-remove:active {
    background: #fff!important;
}

.ssc-account .tracking-label {
    font-size: 0.75rem;
    color: rgb(45 36 32 / 50%);
    white-space: nowrap;
    font-weight: 500;
    position: absolute;
    top: 18px;
}

.ssc-account .tracking-step.completed .tracking-label {
    color: rgb(45 36 32);
}

.ssc-account .tracking-line {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    margin: 0;
}

.ssc-account .tracking-line.completed {
    background: #27C840;
}

.ssc-account .tracking-line.completed:has(+ .tracking-step:not(.completed)) {
    background: linear-gradient(to right, #27C840 35%, var(--color-border) 35%);
}

/* Delivery Card */
.ssc-account .delivery-card {
    background: var(--color-bg);
    padding: 20px;
    font-size: 1rem;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.ssc-account .delivery-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ssc-account .delivery-card-mobile,
.ssc-account .delivery-card-address {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 130%;
}

/* Price Table */
.ssc-account .price-details {
    border-top: 1px solid var(--color-border);
}

.ssc-account .order-price-table {
    background: var(--color-bg);
    overflow: hidden;
    margin-bottom: 0;
}

.ssc-account .order-price-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 10px;
    font-size: 0.875rem;
}

.ssc-account .order-price-row.total {
    font-weight: 600;
    color: #2D2420;
}

/* Order Detail Footer */
.ssc-account .order-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border);
}

.ssc-account .order-detail-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ssc-account .order-detail-actions .btn {
    padding: 12px 20px;
    font-size: 1rem;
}

.ssc-account .btn-download-invoice {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    font-family: inherit;
    margin-bottom: 0px;
}

.ssc-account .btn-download-invoice span {
    text-decoration: underline;
}

.ssc-account .payment-info {
    font-size: 0.875rem;
    color: var(--color-primary);
}

.ssc-account .payment-info strong {
    font-weight: 600;
}

@media (max-width: 768px) {
    .ssc-account .order-detail-footer {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .ssc-account .order-detail-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .ssc-account .order-detail-actions .btn {
        padding: 12px 20px;
        font-size: 1rem;
        width: 48% !important;
    }

    .ssc-account .btn-download-invoice {
        width: 100% !important;
        padding:0 0 12px;
        margin-bottom: 10px;
    }

    .ssc-account .order-product {
        align-items: flex-start;
        padding: 0;
        padding-bottom: 20px;
        gap: 0 20px;
    }


    #ssc-order-detail-content .order-product {
        padding-top: 20px;
    }

    /* Vertical tracking bar */
    .ssc-account .tracking-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 0 20px;
    }

    .ssc-account .arrow-back {
        width: 18px;
    }

    .ssc-account .tracking-step {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .ssc-account .tracking-label {
        position: static;
        white-space: normal;
        line-height: 100%;
    }

    .ssc-account .tracking-line {
        width: 4px;
        height: 30px;
        margin: 0 0 0 4px;
        flex: none;
    }

    .ssc-account .tracking-line.completed:has(+ .tracking-step:not(.completed)) {
        background: linear-gradient(to bottom, #27C840 50%, var(--color-border) 50%);
    }


    


}

/* ============================================
   Cancel Order Form
   ============================================ */

.ssc-account .cancel-order-detail-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Order Meta Grid (Cancel / Refund) */
.ssc-account .order-meta-grid {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.ssc-account .order-meta-dot {
    width: 4px;
    height: 4px;
    min-width: 4px;
    border-radius: 50%;
    background: var(--black-text, #2D2420);
}

/* Order Detail, Cancel Order & Return/Refund: gap between header and meta grid */
.ssc-account .account-tab-panel[data-panel="order-detail"] .order-detail-header,
.ssc-account .account-tab-panel[data-panel="cancel-order"] .order-detail-header,
.ssc-account .account-tab-panel[data-panel="return-refund"] .order-detail-header {
    margin-bottom: 4px;
}

.ssc-account .order-meta-col {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.ssc-account .order-meta-label {
    font-size: 14px;
    color: var(--color-text-secondary, #666);
    line-height: 130%;
}

.ssc-account .order-meta-value {
    font-size: 0.875rem;
    color: var(--black-text);
    line-height: 130%;
}

form#ssc-cancel-order-form {
    margin-top: 15px;
}

#ssc-refund-order-form {
    margin-top: 15px;
}

.ssc-account .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2788 5.9668L8.93208 10.3135C8.41875 10.8268 7.57875 10.8268 7.06542 10.3135L2.71875 5.9668' stroke='%23292D32' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.5);
}

.ssc-account .form-select.has-value {
    color: #2D2420;
}

.ssc-account .form-textarea {
    height: auto;
    padding: 14px 16px;
    resize: vertical;
    font-family: var(--font-sans);
    line-height: 1.5;
}

#ssc-cancel-reason,
#ssc-refund-reason {
    color: #2D2420;
}

#ssc-cancel-reason:invalid,
#ssc-refund-reason:invalid {
    color: rgba(0, 0, 0, 0.5);
}

#ssc-cancel-reason option,
#ssc-refund-reason option {
    color: #2D2420;
}

@media (max-width: 768px) {
    .ssc-account .cancel-order-detail-section {
        gap: 10px;
    }

    textarea#ssc-cancel-comments {
        height: 100px;
    }

    .ssc-account .order-meta-col {
        flex-direction: column;
    }

    .ssc-account .order-meta-dot {
        display: none !important;
    }

    .ssc-account .order-meta-grid {
        gap: 20px;
    }

    .ssc-account .account-tab-panel[data-panel="order-detail"] .order-detail-header,
    .ssc-account .account-tab-panel[data-panel="cancel-order"] .order-detail-header,
    .ssc-account .account-tab-panel[data-panel="return-refund"] .order-detail-header {
        margin-bottom: 10px;
    }

    #ssc-refund-order-form .form-actions-right .btn {
        width: 100% !important;
        min-width: unset !important;
    }

    #ssc-refund-photo-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        align-items: start;
    }

    #ssc-refund-photo-row .photo-upload-box,
    #ssc-refund-photo-row .photo-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }


    .custom-hide-in-sm {
        display: none;
    }

}




/* ============================================
   Account Confirmation (Cancel / Refund)
   ============================================ */

.ssc-account .account-confirmation-content {
    text-align: center;
    padding: 0;
}

.ssc-account .account-confirmation-content .form-title {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-family: var(--serif);
}

.ssc-account .account-confirmation-content .form-subtitle {
    font-size: clamp(0.875rem, 0.824rem + 0.196vw, 1rem);
    color: var(--color-text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.ssc-account .order-conf-id {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.ssc-account .btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.account-confirmation-content .btn {
    font-size: 1rem !important;
}

@media (max-width: 768px) {
   
    div[data-panel="cancel-confirmation"] .account-confirmation-content .btn-group .btn {
        min-width: 0!important;
        padding: 11.5px 6px !important;
    }
}







/* --- Logout Confirmation Modal --- */
.ssc-logout-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.ssc-logout-overlay.is-open {
    display: flex;
}

.ssc-logout-modal {
    background: #FBFAF7;
    padding: 30px;
    max-width: 460px;
    width: calc(100% - 30px);
    text-align: center;
    border-radius: 0;
}

.ssc-logout-title {
    font-family: "Figtree", sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #2D2420 !important;
    margin: 0 0 20px !important;
    line-height: 1.3 !important;
}

.ssc-logout-desc {
    font-family: "Figtree", sans-serif;
    font-size: clamp(1.125rem, 1.074rem + 0.196vw, 1.25rem);
    font-weight: 400;
    color: #2D2420;
    margin: 0 0 40px !important;
    line-height: 1.3;
}

.ssc-logout-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.ssc-logout-btn {
    font-family: "Figtree", sans-serif;
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 14px 20px !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease !important;
    line-height: 1;
    background: transparent !important;
}

.ssc-logout-btn:hover {
    opacity: 0.85;
}

.ssc-logout-cancel {
    background: transparent !important;
    color: #2D2420 !important;
    border: 1px solid #2D2420 !important;
}

.ssc-logout-confirm {
    background: transparent !important;
    color: #FF383C !important;
    border: 1px solid #FF383C !important;
}