/* =========================================================
   Code Intelligence - Project Calculator Steps
   Main stylesheet
   Depends on: ci-variables.css
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        var(--ci-font-rotger), "Tajawal", "Cairo", "Tahoma", Arial, sans-serif;
    color: var(--ci-heading);
    background: var(--ci-bg-main);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

/* =========================================================
   Page Background
========================================================= */

.ci-calculator-page {
    position: relative;
    min-height: 100vh;
    padding: 24px 22px 80px;
    overflow: hidden;
    /* background: var(--ci-gradient-soft); */
}

/* .ci-calculator-page::before,
.ci-calculator-page::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.ci-calculator-page::before {
    inset-inline-start: -12%;
    width: 62%;
    height: 82%;
    opacity: 0.84;
    background: radial-gradient(
        circle,
        var(--ci-bg-soft-purple),
        transparent 68%
    );
    bottom: -18%;
} */

.ci-calculator-page::after {
    top: -10%;
    background: radial-gradient(
        circle,
        var(--ci-bg-soft-cyan),
        transparent 62%
    );
    inset-inline-end: -14%;
    width: 52%;
    height: 56%;
    opacity: 0.75;
}

.ci-calculator-page > * {
    position: relative;
    z-index: 1;
}

html[dir="rtl"] .ci-logo {
    direction: ltr;
}

/* =========================================================
   Main Layout
========================================================= */

.ci-calculator-layout {
    width: min(var(--ci-container-max), 100%);
    margin: 76px auto 0;
}

.ci-calculator-grid {
    align-items: stretch;
}

.ci-form-panel,
.ci-side-panel {
    background: var(--ci-bg-card);
    border: 1px solid var(--ci-border);
    border-radius: var(--ci-radius-xl);
    /* box-shadow: var(--ci-shadow-lg); */
    overflow: hidden;
}

.ci-form-panel {
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.ci-form-head {
    padding: 40px 48px 34px;
    border-bottom: 1px solid var(--ci-border);
    background: linear-gradient(180deg, var(--ci-bg-card), var(--ci-bg-main));
}

.ci-form-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ci-heading);
}

.ci-form-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ci-body);
    line-height: 1.9;
}

.ci-form-desc p {
    margin: 0;
}

.ci-form-body {
    flex: 1;
    padding: 42px 46px 36px;
}

.ci-step-content {
    display: none;
    animation: ciStepFade 0.34s ease both;
}

.ci-step-content.active {
    display: block;
}

@keyframes ciStepFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

/* =========================================================
   Options Cards
========================================================= */

.ci-options-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 38px 44px;
}

.ci-options-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ci-option-card {
    position: relative;
    min-height: 100px;
    padding: 20px 26px;
    border: 2px solid var(--ci-border);
    border-radius: var(--ci-radius-sm);
    background: var(--ci-bg-card-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ci-heading);
    box-shadow: var(--ci-shadow-sm);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.ci-option-card:hover {
    transform: translateY(-3px);
    border-color: var(--ci-border-purple);
    /* background: var(--ci-bg-card-blue); */
    box-shadow: var(--ci-shadow-md);
}

.ci-option-card.selected {
    border-color: var(--ci-primary);
    background: linear-gradient(
        135deg,
        var(--ci-bg-card-blue),
        var(--ci-bg-card-purple)
    );
    box-shadow: var(--ci-shadow-lg);
}

.ci-option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ci-option-radio {
    position: absolute;
    top: 15px;
    inset-inline-end: 15px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ci-border-strong);
    border-radius: 50%;
    background: var(--ci-bg-soft-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ci-white);
    transition: all 0.28s ease;
}

.ci-option-card.selected .ci-option-radio {
    border-color: transparent;
    background: var(--ci-gradient-brand);
}

.ci-option-radio i {
    opacity: 0;
    font-size: 14px;
    transition: opacity 0.28s ease;
}

.ci-option-card.selected .ci-option-radio i {
    opacity: 1;
}

.ci-option-label {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
}
.ci-option-card.selected .ci-option-label {
    font-weight: 500;
}

/* =========================================================
   Form Footer / Buttons / Dots
========================================================= */

.ci-form-footer {
    margin-top: auto;
    padding: 32px 46px 38px;
    border-top: 1px solid var(--ci-border);
    display: grid;
    grid-template-columns: 230px 1fr 230px;
    align-items: center;
    gap: 22px;
    background: var(--ci-bg-main);
}

.ci-step-btn {
    height: 48px;
    border-radius: var(--ci-radius-pill);
    font-size: 17px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition:
        transform 0.28s ease,
        opacity 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.ci-next-btn,
.ci-submit-btn {
    border: 0;
    color: var(--ci-white);
    background: var(--ci-gradient-brand);
    box-shadow: var(--ci-shadow-cyan);
}

.ci-prev-btn {
    border: 2px solid var(--ci-border-strong);
    background: var(--light-gray, #f0f0f0);

    color: var(--ci-primary);
}

.ci-step-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--ci-shadow-md);
}

.ci-prev-btn:hover:not(:disabled) {
    border-color: var(--ci-primary);
}

.ci-step-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ci-step-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ci-step-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ci-border);
    transition:
        width 0.28s ease,
        background 0.28s ease,
        transform 0.28s ease;
}

.ci-step-dot.active {
    /* width: 14px; */
    background: var(--ci-gradient-brand);
    transform: scale(1.05);
}

/* =========================================================
   Sidebar Stepper
========================================================= */

.ci-side-panel {
    /* height: 100%; */
    padding: 36px 30px 32px;
    text-align: start;
}

.ci-side-title {
    margin: 0 0 24px;
    font-size: 30px;
    font-weight: 500;
    color: var(--ci-heading);
}

.ci-side-subtitle {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 400;
    color: var(--ci-heading);
    line-height: 1.7;
}

.ci-side-text {
    margin: 0 auto 25px;
    max-width: 270px;
    color: var(--ci-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}

.ci-stepper-list {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 38px;
}

.ci-stepper-list::before {
    content: "";
    position: absolute;
    top: 25px;
    bottom: 25px;
    width: 2px;
    background: var(--ci-border-strong);
    z-index: 0;
    right: 24px;
}

.ci-stepper-item {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: inherit;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 230px;
    color: var(--ci-muted);
    font-size: 18px;
    font-weight: 300;

    transition: color 0.28s ease;
}

html[dir="ltr"] .ci-stepper-item {
    grid-template-columns: 32px 1fr;
}

.ci-stepper-number {
    width: 32px;
    height: 32px;
    border: 2px solid var(--ci-border-strong);
    border-radius: 50%;
    background: var(--ci-white);
    color: var(--ci-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    transition: all 0.28s ease;
}

.ci-stepper-item.active,
.ci-stepper-item.completed {
    color: var(--ci-heading);
    font-weight: 400;
}

.ci-stepper-item.active .ci-stepper-number,
.ci-stepper-item.completed .ci-stepper-number {
    border-color: var(--ci-secondary);
    background: var(--ci-bg-soft-cyan);
    color: var(--ci-secondary);
}

.ci-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ci-primary);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

.ci-progress-line {
    width: 100%;
    height: 7px;
    border-radius: var(--ci-radius-pill);
    background: var(--ci-bg-soft-purple);
    overflow: hidden;
}

.ci-progress-fill {
    width: 15%;
    height: 100%;
    border-radius: inherit;
    background: var(--ci-gradient-brand);
    transition: width 0.42s ease;
}

/* =========================================================
   Form Fields
========================================================= */

.ci-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
}

.ci-field-group.full {
    grid-column: 1 / -1;
}

.ci-field-label {
    display: block;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 500;
    color: var(--ci-heading);
}

.ci-input-wrap {
    position: relative;
}

.ci-input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-end: 18px;
    color: var(--ci-border-strong);
    font-size: 20px;
    pointer-events: none;
}

.ci-textarea-icon {
    top: 18px;
    transform: none;
}

.ci-form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 10px 12px 18px;
    border: 1px solid var(--ci-border);
    border-radius: var(--ci-radius-sm);
    background: var(--ci-bg-soft);
    color: var(--ci-heading);
    outline: none;
    transition:
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

html[dir="ltr"] .ci-form-control {
    padding: 12px 18px 12px 50px;
}

/* .ci-form-control:focus {
    border-color: var(--ci-border-cyan);
    background: var(--ci-white);
    box-shadow: 0 0 0 4px var(--ci-bg-soft-cyan);
} */

textarea.ci-form-control {
    min-height: 112px;
    resize: vertical;
    background: #f8f8fc;
    font-weight: 100;
}

.ci-phone-row {
    display: flex;
    /* grid-template-columns: 88px 1fr; */
}

html[dir="rtl"] .ci-phone-row {
    /* grid-template-columns: 1fr 88px; */
}

.ci-phone-code {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ci-border);
    background: #f8f8fc;
    color: var(--ci-heading);
    font-weight: 900;
    width: 137px;
}

html[dir="rtl"] .ci-phone-code {
    border-radius: 8px 0 0 8px;
}

html[dir="ltr"] .ci-phone-code {
    border-radius: 0 8px 8px 0;
}

.ci-phone-row .ci-form-control {
    border-left: 0;
    border-radius: 8px 0 0 8px;
    background: #f8f8fc;
    height: 42px;
    /* padding-top: 7px;
    padding-bottom: 7px; */
}

html[dir="rtl"] .ci-phone-row .ci-form-control {
    border-radius: 0 8px 8px 0;
}

html[dir="ltr"] .ci-phone-row .ci-form-control {
    border-radius: 8px 0 0 8px;
}

/* =========================================================
   Animations / Utility
========================================================= */

.ci-fade-up {
    opacity: 0;
    transform: translateY(36px);
    animation: ciFadeUp 0.85s ease forwards;
}

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