/* ========================================
   PERSONAL AREA - AUTH PAGE
   ======================================== */

.personal-auth-page {
    --auth-bg-1: #f8efe2;
    --auth-bg-2: #e8f2ff;
    --auth-card: #e5e5e7;
    --auth-text: #2f3337;
    --auth-muted: #6a7380;
    --auth-accent: #0b7be8;
    --auth-accent-hover: #0964c0;
    --auth-border: #d1d1d6;
    --auth-shadow: 0 12px 24px rgba(33, 48, 72, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
    background:
        radial-gradient(130% 90% at 0% 0%, var(--auth-bg-1) 0%, rgba(248, 239, 226, 0) 56%),
        radial-gradient(130% 95% at 100% 100%, var(--auth-bg-2) 0%, rgba(232, 242, 255, 0) 58%),
        #f7f8fb;
}


.section__inner {
    width: 100%;
    max-width: 1540px;
}


@media only screen and (min-width: 1192px) {
    .section__content {
        padding: 1rem;
    }
}


.personal-auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: var(--auth-shadow);
    padding: 32px 28px 28px;
}

.personal-auth-title {
    margin: 0 0 8px;
    color: var(--auth-text);
    font-size: 32px;
    line-height: 1.2;
    font-weight: 400;
}

.personal-auth-subtitle {
    margin: 0 0 24px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.45;
}

.personal-auth-subtitle--danger {
    color: #c7352b;
    font-weight: 700;
}

.personal-auth-errors {
    margin-bottom: 20px;
}

.personal-auth-error-box {
    background: #fff3f2;
    border: 1px solid #ffd2cc;
    border-left: 4px solid #e05544;
    border-radius: 10px;
    padding: 12px 14px 10px;
    color: #8c1f14;
}

.personal-auth-error-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.personal-auth-error-list {
    margin: 0;
    padding: 0 0 0 18px;
}

.personal-auth-error-item {
    font-size: 13px;
    line-height: 1.35;
    margin: 0 0 4px;
}

.personal-auth-field {
    margin-bottom: 16px;
}

.personal-auth-label {
    display: block;
    color: var(--auth-text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.personal-auth-input {
    width: 100%;
    height: 42px;
    border: 1px solid #b8b8ba;
    border-radius: 8px;
    padding: 0 14px;
    color: var(--auth-text);
    font-size: 15px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
    box-sizing: border-box;
}

.personal-auth-input:focus {
    border-color: var(--auth-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 123, 232, 0.15);
}

.personal-auth-submit {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    border: none;
    border-radius: 8px;
    background: var(--auth-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background-color .2s ease, transform .08s ease;
}

.personal-auth-submit:hover {
    background: var(--auth-accent-hover);
}

.personal-auth-submit:active {
    transform: translateY(1px);
}

.personal-auth-note {
    margin-top: 16px;
    color: var(--auth-muted);
    font-size: 13px;
    text-align: center;
    line-height: 1.4;
}

/* в архиве */
.order_status_2 {
    background: #d1e7dd;
}

/* в корзине */
.order_status_3 {
    background: #f8d7da;
}

/* новый */
.order_state_175019 {
    background: #cfe2ff;
}
/* оплачивается */
.order_state_167691 {
    background: #cff4fc;
}
/* оплачен */
.order_state_207261 {
    background: #D3F58A;
}
/* в обработке */
.order_state_167517 {
    background: #fff3cd;
}
/* готов */
.order_state_167348 {
    background: #fefefe;
}
/* доставляется */
.order_state_167448 {
    background: #d3d3d4;
}
/* доставлен в пункт самовывоза */
.order_state_168792 {
    background: graytext;
}
/* завершен */
.order_state_123247 {
    background: #d1e7dd;
}
/* отменен */
.order_state_167356 {
    background: #f8d7da;
}

tr.order_state_175019,
tr.order_state_175019 > td {
    background-color: #cfe2ff !important;
}

tr.order_state_207261,
tr.order_state_207261 > td {
    background-color: #D3F58A !important;
}


.platform {
    background: lightgrey;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 10px;
}

/* Personal orders table layout fix */
#cont-shop-invoices .scrollable-table-container {
    width: 100%;
    max-width: 100%;
/*    overflow-x: auto;*/
/*    overflow-y: hidden;*/
}

#cont-shop-invoices #invoice-table {
    width: 100%;
    min-width: 0;
}

#cont-shop-invoices #invoice-table .gTableSubTop {
    white-space: nowrap;
}

#cont-shop-invoices #invoice-table .forumIcoTd,
#cont-shop-invoices #invoice-table .forumNameTd {
    vertical-align: top;
    word-break: normal;
    overflow: hidden;
    /*white-space: nowrap;    */
}

#cont-shop-invoices #invoice-table .th_col_state,
#cont-shop-invoices #invoice-table .col_state {
/*    width: 200px;
    min-width: 200px;
    max-width: 200px;*/
}

#cont-shop-invoices #invoice-table .th_col_order_status,
#cont-shop-invoices #invoice-table .col_order_status {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

/* Export mini-buttons (XML/XLS) */
/*#invoice-form #invoice-form-export-xml,*/
/*#invoice-form #invoice-form-export-xls {*/
/*    display: inline-flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    min-width: 58px;*/
    /*height: 42px;*/
/*    margin: 0 6px 0 0;*/
/*    padding: 0 14px;*/
/*    border: 0;*/
/*    border-radius: 10px;*/
/*    background: #1976e8;*/
/*    color: #fff;*/
/*    font-size: 20px;*/
/*    font-weight: 700;*/
/*    line-height: 1;*/
/*    cursor: pointer;*/
/*    transition: background-color .2s ease, transform .08s ease;*/
    
    
/*    height: 2rem;*/
/*}*/

/*#invoice-form #invoice-form-export-xml:hover,*/
/*#invoice-form #invoice-form-export-xls:hover {*/
/*    background: #0f66d0;*/
/*}*/

#invoice-form #invoice-form-export-xml:active,
#invoice-form #invoice-form-export-xls:active {
    transform: translateY(1px);
}


/* ========================================
   RESPONSIVE - AUTH
   ======================================== */

@media (max-width: 640px) {
    .personal-auth-card {
        padding: 24px 20px 20px;
    }

    .personal-auth-title {
        font-size: 28px;
    }
}

.personal-auth-links {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.personal-auth-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #d68f2f;
    border-radius: 999px;
    background: #fff5e8;
    color: #a95a00;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .08s ease;
}

.personal-auth-link-btn:hover {
    background: #ffe8c8;
    border-color: #c97811;
    color: #8f4700;
}

.personal-auth-link-btn:active {
    transform: translateY(1px);
}

@media (max-width: 640px) {
    .personal-auth-links {
        flex-direction: column;
    }

    .personal-auth-link-btn {
        width: 100%;
    }
}


/**
 * ========================================================================
 * CSS СТИЛИ ДЛЯ EDIT-IN-PLACE СОСТОЯНИЯ ЗАКАЗА
 * ========================================================================
 * 
 * Добавьте эти стили в конец файла:
 * /templates/default/css/basket.css
 * 
 * ========================================================================
 */

/* ========================================
   EDIT-IN-PLACE для состояния заказа
   ======================================== */

/* Контейнер для edit-in-place */
.order-edit-inline {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.order-edit-trigger {
    display: inline-block;
    max-width: 100%;
    padding: 0 0 2px;
    border: 0;
    background: transparent;
    color: #2f3337;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;    
    text-underline-offset: 3px;
    cursor: pointer;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    word-break: normal;
    vertical-align: top;
}

.order-edit-trigger:hover {
    color: #0b67d3;
}

.order-edit-field {
    display: none;
    width: 100%;
}

.order-edit-inline.is-editing .order-edit-trigger {
    display: none;
}

.order-edit-inline.is-editing .order-edit-field {
    display: block;
}

.order-edit-inline.is-saving {
    opacity: 0.75;
}

.order-edit-cell {
    white-space: normal !important;
    overflow: visible !important;
}

.order-state-selector,
.order-status-selector {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Стилизация полей edit-in-place */
.order-inline-input,
.order-inline-textarea,
.order-inline-select,
.order-state-dropdown,
.order-status-dropdown {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #333;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.order-inline-input,
.order-inline-textarea {
    background-image: none;
    cursor: text;
}

.order-inline-input {
    min-width: 180px;
    min-height: 48px;
}

.order-inline-textarea {
    min-width: 220px;
    min-height: 110px;
    resize: vertical;
}

.order-inline-select,
.order-state-dropdown,
.order-status-dropdown {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

/* Hover эффект */
.order-inline-input:hover,
.order-inline-textarea:hover,
.order-inline-select:hover,
.order-state-dropdown:hover,
.order-status-dropdown:hover {
    border-color: #aaa;
}

/* Focus эффект */
.order-inline-input:focus,
.order-inline-textarea:focus,
.order-inline-select:focus,
.order-state-dropdown:focus,
.order-status-dropdown:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}

/* Disabled состояние (во время обновления) */
.order-inline-input:disabled,
.order-inline-textarea:disabled,
.order-inline-select:disabled,
.order-state-dropdown:disabled,
.order-status-dropdown:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   Цветовая индикация строк по состоянию
   ======================================== */

/* Новый */
tr.order_state_50fcd738-4791-11ec-0a80-003f000aac5d,
tr[class*="order_state_"][class*="50fcd738"] {
    background-color: #fffbf0 !important;
}

/* Оплачен */
tr.order_state_50fcd87a-4791-11ec-0a80-003f000aac5e,
tr[class*="order_state_"][class*="50fcd87a"] {
    background-color: #f0fff4 !important;
}

/* В обработке */
tr.order_state_50fcd966-4791-11ec-0a80-003f000aac5f,
tr[class*="order_state_"][class*="50fcd966"] {
    background-color: #f0f9ff !important;
}

/* Отправлен */
tr.order_state_50fcda2a-4791-11ec-0a80-003f000aac60,
tr[class*="order_state_"][class*="50fcda2a"] {
    background-color: #faf5ff !important;
}

/* Завершён */
tr.order_state_49eb10d7-580e-11ec-0a80-09600023e041,
tr[class*="order_state_"][class*="49eb10d7"] {
    background-color: #e8f5e9 !important;
}

/* Отменён */
tr.order_state_49eb11fd-580e-11ec-0a80-09600023e042,
tr[class*="order_state_"][class*="49eb11fd"] {
    background-color: #ffebee !important;
}

/* Возврат */
tr.order_state_50fcdaec-4791-11ec-0a80-003f000aac61,
tr[class*="order_state_"][class*="50fcdaec"] {
    background-color: #fff3e0 !important;
}

/* ========================================
   Уведомления (для функции showOrderNotification)
   ======================================== */

.order-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10000;
    font-size: 14px;
    max-width: 300px;
    color: #fff;
}

.order-notification-success {
    background-color: #4CAF50;
}

.order-notification-error {
    background-color: #f44336;
}

.order-notification-info {
    background-color: #2196F3;
}

/* ========================================
   Адаптивность для мобильных устройств
   ======================================== */

@media (max-width: 768px) {
    .order-edit-trigger {
        font-size: 12px;
    }

    .order-state-dropdown,
    .order-status-dropdown {
        font-size: 12px;
        padding: 4px 8px;
        padding-right: 28px;
        background-size: 14px;
        background-position: right 6px center;
    }

    .order-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .order-edit-trigger {
        font-size: 11px;
    }

    .order-state-dropdown,
    .order-status-dropdown {
        font-size: 11px;
        padding: 3px 6px;
        padding-right: 26px;
    }
}





.order-note-cell {
    cursor: pointer;
    vertical-align: top;
}

.order-note-inline {
    min-height: 2.5rem;
}

.order-note-inline .order-modal-trigger {
    display: block;
    width: 100%;
    min-height: 2.25rem;
    box-sizing: border-box;
    padding: 6px 4px;
    text-align: left;
}

.order-note-inline .order-edit-field {
    display: none !important;
}



.order-note-modal-open {
    overflow: hidden;
}

.order-note-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
}

.order-note-modal.is-open {
    display: block;
}

.order-note-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.order-note-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100% - 24px));
    margin: 8vh auto 0;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    
    
}

.order-note-modal__header,
.order-note-modal__footer {
    padding: 12px 14px;
    background:#1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.order-note-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #deddd9;
}

.order-note-modal__close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.order-note-modal__body {
    padding: 14px;
}

.order-note-modal__textarea {
    width: 100%;
    background: #1a1a1a;
    color: #deddd9;
    min-height: 220px;
        border-radius: 5px;
    padding: 5px;
    margin:10px 0;
}


#order-note-modal-save{
    background: cornflowerblue;
    border: none;
    border-radius: 6px;
    color: #fff;
    padding: 3px 10px;
}


.order-note-modal__close{
        color: #fff;
}




.order-note-modal__meta {
    padding-bottom: 10px;
    font-size: 14px;
    color: #deddd9;
    border-bottom: 1px solid #fff;
}




.order-state-dropdown-st{
    padding:0 5px;
    background-position: right 0px center;
     min-width: 100px;
    /*min-height: 48px;*/
}

#order-history-modal-textarea{
    border:none;
}


#order-history-modal-textarea:focus-visible {
      border:none;
          outline: none;
}




.order_state_262112{
        background: #6495edc4;
}
