/* =========================================
   EKA UI SYSTEM
   Forms / Accordion / Buttons / Alerts
   ========================================= */

/* ---------- motion ---------- */
html{
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce){
    html{
        scroll-behavior: auto;
    }

    .eka-success-card,
    .eka-order-accordion .acc-content{
        animation: none !important;
    }
}

/* ---------- common animations ---------- */
@keyframes ekaFadeIn{
    from{
        opacity: 0;
        transform: translateY(10px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ekaSuccessReveal{
    0%{
        opacity: 0;
        transform: translateY(28px) scale(0.985);
    }
    100%{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   FORM WRAPPERS / CARDS
   ========================================= */

.eka-reg-wrap,
.eka-order-wrap,
.eka-success-wrap{
    max-width: 980px;
    margin: 40px auto;
    padding: 0 15px;
}

.eka-success-wrap{
    max-width: 760px;
}

.eka-reg-card,
.eka-order-card,
.eka-success-card{
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(247,250,252,0.92));
    border: 1px solid rgba(220,228,236,0.95);
    box-shadow:
        0 20px 60px rgba(3,18,33,0.14),
        0 8px 24px rgba(3,18,33,0.06);
    overflow: hidden;
}

.eka-reg-card,
.eka-order-card{
    padding: 34px 34px 30px;
    border-radius: 28px;
}

.eka-success-card{
    padding: 40px 36px;
    border-radius: 26px;
    text-align: center;
    animation: ekaSuccessReveal .65s ease-out;
}

.eka-reg-card:before,
.eka-order-card:before{
    content:"";
    position:absolute;
    right:-80px;
    top:-80px;
    width:220px;
    height:220px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(207,37,74,0.10) 0%, rgba(207,37,74,0.00) 70%);
    pointer-events:none;
}

.eka-reg-card:after,
.eka-order-card:after{
    content:"";
    position:absolute;
    left:-100px;
    bottom:-100px;
    width:240px;
    height:240px;
    border-radius:50%;
    background: radial-gradient(circle, rgba(17,36,51,0.06) 0%, rgba(17,36,51,0.00) 70%);
    pointer-events:none;
}

/* =========================================
   HEADERS / TEXT
   ========================================= */

.eka-reg-head,
.eka-order-head{
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.eka-reg-badge{
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(207,37,74,0.10);
    color: #c91f45;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eka-reg-title,
.eka-order-title{
    margin: 14px 0 10px;
    color: #112433;
    line-height: 1.08;
    font-weight: 800;
}

.eka-reg-title{
    font-size: 38px;
}

.eka-order-title{
    font-size: 34px;
    margin: 0 0 10px;
}

.eka-reg-subtitle,
.eka-order-text{
    margin: 0;
    color: #5a6a77;
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
}

/* =========================================
   FORM LAYOUT
   ========================================= */

.eka-reg-form,
.eka-order-form{
    position: relative;
    z-index: 1;
}

.eka-reg-grid,
.eka-order-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
    margin-bottom: 20px;
}

.eka-field{
    display: flex;
    flex-direction: column;
}

.eka-field-full{
    grid-column: 1 / -1;
}

.eka-field label,
.eka-check-label{
    margin: 0 0 8px;
    color: #223544;
    font-size: 14px;
    font-weight: 700;
}

/* =========================================
   INPUTS
   ========================================= */

.eka-input{
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border: 1px solid #d8e1e8;
    border-radius: 16px;
    background: #fff;
    color: #102231;
    font-size: 16px;
    line-height: 1.2;
    box-sizing: border-box;
    outline: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.eka-input::placeholder{
    color: #94a3af;
}

.eka-input:focus{
    border-color: #cf254a;
    box-shadow: 0 0 0 4px rgba(207,37,74,0.12);
}

.eka-select{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 46px;
    background-image:
        linear-gradient(45deg, transparent 50%, #7d8a96 50%),
        linear-gradient(135deg, #7d8a96 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.eka-textarea{
    min-height: 130px;
    resize: vertical;
    padding-top: 14px;
}

/* =========================================
   CHECK CARDS
   ========================================= */

.eka-check-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.eka-check-card{
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #d8e1e8;
    border-radius: 16px;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
    box-sizing: border-box;
}

.eka-check-card:hover{
    transform: translateY(-1px);
    border-color: #cf254a;
    box-shadow: 0 10px 24px rgba(17,36,51,0.08);
}

.eka-check-card input{
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #cf254a;
    flex: 0 0 auto;
}

.eka-check-card span{
    color: #203241;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}

/* =========================================
   FOOTERS / BUTTONS / NOTES
   ========================================= */

.eka-reg-footer,
.eka-order-footer{
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.eka-reg-footer{
    justify-content: space-between;
}

.eka-order-footer{
    justify-content: flex-end;
}

.eka-reg-note{
    margin: 0;
    color: #60707d;
    font-size: 14px;
    line-height: 1.5;
    flex: 1 1 320px;
}

.eka-submit-btn,
a.eka-submit-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 58px;
    height: 58px;
    padding: 0 26px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #df3653 0%, #c71f43 100%);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: middle;
    cursor: pointer;
    box-shadow:
        0 14px 28px rgba(199,31,67,0.24),
        inset 0 1px 0 rgba(255,255,255,0.18);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.eka-submit-btn{
    min-width: 220px;
}

.eka-success-card a.eka-submit-btn{
    margin-top: 24px;
}

.eka-submit-btn:hover{
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow:
        0 18px 34px rgba(199,31,67,0.30),
        inset 0 1px 0 rgba(255,255,255,0.18);
}

.eka-submit-btn:active{
    transform: translateY(0);
}

/* =========================================
   RADIO GROUPS
   ========================================= */

.eka-radio-group{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.eka-radio-card{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #d8e1e8;
    border-radius: 16px;
    cursor: pointer;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
    box-sizing: border-box;
}

.eka-radio-card:hover{
    transform: translateY(-1px);
    border-color: #cf254a;
    box-shadow: 0 10px 24px rgba(17,36,51,0.08);
}

.eka-radio-card input{
    margin: 2px 0 0;
    accent-color: #cf254a;
    flex: 0 0 auto;
}

.eka-radio-card span{
    color: #203241;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
}

/* =========================================
   SUCCESS / ALERTS
   ========================================= */

.eka-success-icon{
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(180deg,#39c08c,#2aa573);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 34px;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(42,165,115,0.35);
}

.eka-success-title{
    font-size: 32px;
    font-weight: 800;
    color: #112433;
    margin-bottom: 10px;
}

.eka-success-text{
    font-size: 17px;
    line-height: 1.6;
    color: #4c5c69;
    margin-bottom: 26px;
}

.eka-success-date{
    font-size: 20px;
    font-weight: 700;
    color: #cf254a;
}

.eka-order-success{
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(57,192,140,0.12), rgba(42,165,115,0.08));
    border: 1px solid rgba(42,165,115,0.20);
    color: #1f6b4c;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.eka-order-success:empty{
    display: none;
}

/* video responsive */
.eka-video-wrap{
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    margin-top: 20px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 12px 30px rgba(3,18,33,0.12),
        0 4px 10px rgba(3,18,33,0.06);
}

.eka-video-wrap iframe{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   ALERTS
   ========================================= */

.eka-alert{
    margin: 0 auto 20px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    box-shadow:
        0 10px 24px rgba(3,18,33,0.06),
        0 2px 6px rgba(3,18,33,0.03);
}

.eka-alert-title{
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}

.eka-alert-text{
    font-size: 15px;
    line-height: 1.6;
    color: #4c5c69;
}

.eka-alert-error{
    background: linear-gradient(135deg, rgba(255,245,247,0.98), rgba(255,250,251,0.94));
    border-color: rgba(199,31,67,0.18);
}

.eka-alert-error .eka-alert-title{
    color: #c71f43;
}

/* =========================================
   ACCORDION
   ========================================= */

.eka-order-accordion{
    margin-bottom: 18px;
    border-top: none !important;
}

.eka-order-accordion .acc-title{
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff, #f3f7fa);
    border: 1px solid #dde5ec;
    box-shadow:
        0 10px 26px rgba(3,18,33,0.08),
        0 2px 8px rgba(3,18,33,0.04);
    transition: all .25s ease;
    overflow: hidden;
}

.eka-order-accordion .acc-title:hover{
    transform: translateY(-2px);
    box-shadow:
        0 16px 40px rgba(3,18,33,0.12),
        0 4px 12px rgba(3,18,33,0.06);
}

.eka-order-accordion .acc-title::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    background: radial-gradient(circle at top right, rgba(46,163,106,0.10), transparent 40%);
    opacity:0;
    transition:opacity .3s;
}

.eka-order-accordion .acc-title p{
    margin: 0;
    padding: 20px 60px 20px 24px;
    font-size: 24px;
    font-weight: 800;
    color: #112433;
    line-height: 1.2;
}

/* стрелка зеленая всегда */
.eka-order-accordion .acc-title::after{
    content:"";
    position:absolute;
    right:22px;
    top:50%;
    width:12px;
    height:12px;
    border-right:3px solid #2ea36a;
    border-bottom:3px solid #2ea36a;
    transform:translateY(-50%) rotate(45deg);
    transition: all .25s ease;
}

/* active accordion */
.eka-order-accordion .acc-title.active{
    background: linear-gradient(135deg, #ffffff, #eefaf3);
    border-color: #2ea36a;
    box-shadow:
        0 16px 40px rgba(46,163,106,0.18),
        0 6px 16px rgba(46,163,106,0.10);
}

.eka-order-accordion .acc-title.active p{
    color: #2ea36a;
}

.eka-order-accordion .acc-title.active::before{
    opacity: 1;
}

.eka-order-accordion .acc-title.active::after{
    transform:translateY(-50%) rotate(-135deg);
}

.eka-order-accordion .acc-content{
    animation: ekaFadeIn .35s ease;
    border-bottom: none !important;
}

/* когда карточка внутри аккордеона */
.eka-order-accordion .eka-order-card{
    border-top: 0;
    border-radius: 0 0 24px 24px;
    padding: 30px 30px 26px;
}

/* =========================================
   TRANSITIONAL FIXES FOR LEGACY ACCORDION
   only for new EKA accordion blocks
   ========================================= */

.eka-order-accordion .acc-title .fa,
.eka-order-accordion .acc-title .glyphicon,
.eka-order-accordion .acc-title .icon,
.eka-order-accordion .acc-title .caret-down,
.eka-order-accordion .acc-title .caret-right{
    display: none !important;
}

.eka-order-accordion .acc-title p::before,
.eka-order-accordion .acc-title p::after{
    content: none !important;
    display: none !important;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 900px){
    .eka-reg-card,
    .eka-order-card{
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .eka-order-accordion .eka-order-card{
        border-radius: 0 0 20px 20px;
        padding: 24px 18px 20px;
    }

    .eka-reg-title{
        font-size: 30px;
    }

    .eka-order-title{
        font-size: 28px;
    }

    .eka-reg-grid,
    .eka-order-grid,
    .eka-check-grid{
        grid-template-columns: 1fr;
    }

    .eka-reg-footer{
        flex-direction: column;
        align-items: stretch;
    }

    .eka-order-footer{
        justify-content: stretch;
    }

    .eka-submit-btn{
        width: 100%;
        min-width: 0;
    }

    .eka-order-accordion .acc-title p{
        font-size: 22px;
        padding: 18px 52px 18px 18px;
    }
}

/* =========================================
   ORDER LIST / SUBMITTED APPLICATIONS
   ========================================= */

.eka-order-history{
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* карточки */
.items_list{
    position: relative;
    margin: 0 0 10px;
    padding: 14px 54px 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(220,228,236,0.95);
    border-radius: 14px;
    box-shadow:
        0 6px 16px rgba(3,18,33,0.05),
        0 2px 6px rgba(3,18,33,0.03);
    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.items_list:hover{
    transform: translateY(-1px);
    box-shadow:
        0 10px 22px rgba(3,18,33,0.08),
        0 3px 8px rgba(3,18,33,0.05);
}

/* текст */
.items_list p{
    margin: 0;
    font-size: 15px;
    color: #4c5c69;
    line-height: 1.5;
}

.items_list span{
    margin-right: 10px;
}

/* delete */
.items_list .itemm_delete{
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.items_list .itemm_delete a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #c71f43;
    background: rgba(199,31,67,0.08);
    transition: all .15s ease;
}

.items_list .itemm_delete a:hover{
    background: rgba(199,31,67,0.15);
    transform: scale(1.08);
}

.items_list .itemm_delete i{
    font-size: 14px;
}


/* =========================================
   STATUS COLORS
   ========================================= */
.txt_new{
    font-style: italic;
    font-weight: 700;
    color: #2f5fa7; /* синий */
}

.txt_success{
    font-style: italic;
    font-weight: 700;
    color: #2ea36a; /* зелёный */
}

.txt_error{
    font-style: italic;
    font-weight: 700;
    color: #c71f43; /* красный */
}

/* =========================================
   ORDER HISTORY TITLE
   ========================================= */

.eka-order-history-title{
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 14px;
    padding-left: 2px;

    font-size: 20px;
    font-weight: 800;
    color: #112433;
}

/* декоративная линия слева */
.eka-order-history-title::before{
    content:"";
    width: 6px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(180deg, #2ea36a, #1f7d52);
    display: inline-block;
}

/* можно добавить легкий secondary текст */
.eka-order-history-title small{
    font-size: 13px;
    font-weight: 600;
    color: #6b7a86;
    margin-left: 6px;
}
/*
.eka-order-history-title::after{
    content:"";
    flex:1;
    height:1px;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
    margin-left: 10px;
}
*/
/* optional: mobile */
@media (max-width: 900px){
    .items_list{
        padding: 14px 46px 14px 14px;
    }

    .items_list p{
        font-size: 14px;
    }

    .items_list .itemm_delete a{
        width: 28px;
        height: 28px;
    }
}
