/* ST CRM - Optimized Multi-Step Contact Form Styles */

:root {
    --st-primary: #636edf;
    --st-primary-hover: #5963c8;
    --st-success: #10b981;
    --st-error: #ef4444;
    --st-text: #1f2937;
    --st-text-light: #6b7280;
    --st-border: #e5e7eb;
    --st-bg-light: #f9fafb;
    --st-white: #ffffff;
    --st-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* CTA Button */
.st-cta-open-form {
    background: linear-gradient(135deg, var(--st-primary) 0%, var(--st-primary-hover) 100%);
    color: var(--st-white);
    padding: 18px 48px;
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(99, 110, 223, 0.3);
}

.st-cta-open-form:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(99, 110, 223, 0.4);
}

/* Modal */
.st-form-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.st-form-modal.active {
    display: block;
}

.st-form-modal-content {
    background-color: var(--st-white);
    margin: 2% auto;
    padding: 0;
    width: 95%;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: var(--st-shadow);
    position: relative;
    max-height: 95vh;
    overflow: hidden;
}

.st-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--st-text-light);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.st-modal-close:hover {
    background: var(--st-bg-light);
    color: var(--st-text);
}

/* Layout: Sidebar + Main */
.st-form-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    height: 95vh;
    max-height: 900px;
}

.st-form-main {
    padding: 40px;
    overflow-y: auto;
}

.st-form-sidebar {
    background: linear-gradient(180deg, var(--st-bg-light) 0%, var(--st-white) 100%);
    border-left: 1px solid var(--st-border);
    padding: 30px;
    overflow-y: auto;
}

.st-summary-sticky {
    position: sticky;
    top: 0;
}

/* Progress Tracker */
.st-progress-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 30px 0;
}

.st-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.st-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--st-white);
    border: 3px solid var(--st-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--st-text-light);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.st-progress-step.active .st-step-number {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: var(--st-white);
    box-shadow: 0 4px 12px rgba(99, 110, 223, 0.4);
}

.st-progress-step.completed .st-step-number {
    background: var(--st-success);
    border-color: var(--st-success);
    color: var(--st-white);
}

.st-step-label {
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--st-text-light);
}

.st-progress-step.active .st-step-label {
    color: var(--st-primary);
}

.st-progress-line {
    width: 80px;
    height: 3px;
    background: var(--st-border);
    margin: 0 10px;
    position: relative;
    top: -20px;
}

/* Form Header */
.st-form-header {
    text-align: center;
    margin-bottom: 32px;
}

.st-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--st-text);
    margin-bottom: 8px;
}

.st-form-subtitle {
    font-size: 1rem;
    color: var(--st-text-light);
}

/* Form Steps */
.st-form-step {
    display: none;
}

.st-form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.st-form-step h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--st-text);
    margin-bottom: 8px;
}

.st-step-description {
    color: var(--st-text-light);
    margin-bottom: 32px;
}

/* Subsections */
.st-subsection {
    margin-bottom: 32px;
}

.st-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--st-text);
    margin-bottom: 16px;
}

.st-badge-optional {
    font-size: 0.75rem;
    background: var(--st-bg-light);
    color: var(--st-text-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 8px;
}

/* Radio Cards */
.st-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.st-radio-card {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    border: 2px solid var(--st-border);
    background: var(--st-white);
    padding: 16px;
    transition: all 0.3s ease;
    display: block;
}

.st-radio-card:hover {
    border-color: var(--st-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 110, 223, 0.2);
}

.st-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.st-radio-card input[type="radio"]:checked + .st-card-content {
    background: linear-gradient(135deg, rgba(99, 110, 223, 0.05) 0%, rgba(99, 110, 223, 0.1) 100%);
}

.st-radio-card input[type="radio"]:checked ~ .st-card-content::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--st-primary);
    color: var(--st-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.st-card-content {
    text-align: center;
    position: relative;
    border-radius: 8px;
    padding: 8px;
}

.st-card-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.st-card-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--st-text);
    margin: 0 0 4px 0;
}

.st-card-content p {
    font-size: 0.75rem;
    color: var(--st-text-light);
    margin: 0;
}

/* Select Large */
.st-select-large {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--st-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--st-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.st-select-large:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 4px rgba(99, 110, 223, 0.1);
}

/* Quick Addons Pills */
.st-quick-addons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.st-quick-addon {
    cursor: pointer;
}

.st-quick-addon input[type="checkbox"] {
    display: none;
}

.st-addon-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--st-white);
    border: 2px solid var(--st-border);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--st-text);
    transition: all 0.3s ease;
}

.st-quick-addon:hover .st-addon-pill {
    border-color: var(--st-primary);
    background: rgba(99, 110, 223, 0.05);
}

.st-quick-addon input:checked + .st-addon-pill {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: var(--st-white);
    box-shadow: 0 2px 8px rgba(99, 110, 223, 0.3);
}

.st-addon-icon {
    font-size: 1.125rem;
}

/* Checkbox Grid */
.st-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.st-checkbox-card {
    cursor: pointer;
}

.st-checkbox-card input[type="checkbox"] {
    display: none;
}

.st-checkbox-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--st-white);
    border: 2px solid var(--st-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.st-checkbox-card:hover .st-checkbox-card-content {
    border-color: var(--st-primary);
    background: rgba(99, 110, 223, 0.05);
}

.st-checkbox-card input:checked + .st-checkbox-card-content {
    background: var(--st-primary);
    border-color: var(--st-primary);
    color: var(--st-white);
}

.st-checkbox-icon {
    font-size: 2rem;
}

.st-checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Expandable Sections */
.st-expandable-section {
    margin-bottom: 16px;
}

.st-expand-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--st-bg-light);
    border: 2px solid var(--st-border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--st-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.st-expand-btn:hover {
    background: var(--st-border);
}

.st-expand-btn.active {
    border-color: var(--st-primary);
    color: var(--st-primary);
}

.st-expand-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.st-expand-btn.active .st-expand-icon {
    transform: rotate(45deg);
}

.st-expandable-content {
    margin-top: 16px;
    padding: 20px;
    background: var(--st-bg-light);
    border-radius: 12px;
}

/* More Addons & Advanced */
.st-more-addons,
.st-services-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.st-addon-group,
.st-service-category-compact {
    background: var(--st-white);
    padding: 16px;
    border-radius: 8px;
}

.st-addon-group h5,
.st-service-category-compact h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--st-text);
}

.st-checkbox-simple {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
}

.st-checkbox-simple input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--st-primary);
    cursor: pointer;
}

.st-checkbox-simple span {
    font-size: 0.875rem;
    color: var(--st-text);
}

.st-advanced-notice {
    background: #FEF3C7;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #F59E0B;
    margin-bottom: 16px;
}

.st-advanced-notice p {
    margin: 0;
    font-size: 0.875rem;
    color: #92400E;
}

/* Form Fields */
.st-form-field {
    margin-bottom: 20px;
}

.st-form-field label {
    display: block;
    font-weight: 600;
    color: var(--st-text);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: var(--st-error);
}

.st-form-field input[type="text"],
.st-form-field input[type="email"],
.st-form-field input[type="tel"],
.st-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--st-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--st-white);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.st-form-field input:focus,
.st-form-field textarea:focus {
    outline: none;
    border-color: var(--st-primary);
    box-shadow: 0 0 0 4px rgba(99, 110, 223, 0.1);
}

.st-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Navigation */
.st-form-navigation {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.st-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.st-btn-prev {
    background: var(--st-white);
    color: var(--st-text);
    border: 2px solid var(--st-border);
}

.st-btn-prev:hover {
    background: var(--st-bg-light);
}

.st-btn-next,
.st-btn-submit {
    background: linear-gradient(135deg, var(--st-primary) 0%, var(--st-primary-hover) 100%);
    color: var(--st-white);
    box-shadow: 0 4px 12px rgba(99, 110, 223, 0.3);
}

.st-btn-next:hover,
.st-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 110, 223, 0.4);
}

/* Messages */
.st-form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.st-form-message.success {
    background: #d1fae5;
    color: #065f46;
}

.st-form-message.error {
    background: #fee2e2;
    color: #991b1b;
}

.st-form-note {
    text-align: center;
    color: var(--st-text-light);
    font-size: 0.875rem;
    margin-top: 16px;
}

/* Sidebar Summary */
.st-summary-sticky h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--st-text);
    margin: 0 0 24px 0;
}

.st-summary-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--st-border);
}

.st-summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--st-text-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.st-summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--st-text);
}

.st-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.st-summary-list-item {
    font-size: 0.875rem;
    color: var(--st-text);
    padding: 6px 10px;
    background: var(--st-white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.st-summary-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--st-primary);
}

/* Progress Bar in Summary */
.st-summary-progress {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--st-border);
}

.st-progress-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--st-text-light);
    font-weight: 600;
    margin-bottom: 12px;
}

.st-progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--st-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.st-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--st-primary) 0%, var(--st-success) 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.st-progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--st-primary);
    text-align: center;
}

.st-summary-footer {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 110, 223, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
}

.st-summary-note {
    font-size: 0.875rem;
    color: var(--st-text-light);
    margin: 0;
    text-align: center;
}

/* Language Count Selector */
.st-language-count {
    margin-top: 20px;
    padding: 20px;
    background: var(--st-white);
    border: 2px solid var(--st-primary);
    border-radius: 12px;
}

.st-language-count label {
    display: block;
    font-weight: 600;
    color: var(--st-text);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.st-number-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.st-number-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--st-primary);
    background: var(--st-white);
    color: var(--st-primary);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.st-number-btn:hover {
    background: var(--st-primary);
    color: var(--st-white);
    transform: scale(1.1);
}

.st-number-btn:active {
    transform: scale(0.95);
}

.st-number-picker input[type="number"] {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--st-text);
    border: 2px solid var(--st-border);
    border-radius: 8px;
    background: var(--st-white);
}

.st-number-hint {
    font-size: 0.875rem;
    color: var(--st-text-light);
    font-style: italic;
}

/* Responsive */
@media (max-width: 968px) {
    .st-form-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .st-form-sidebar {
        border-left: none;
        border-top: 1px solid var(--st-border);
        order: 2;
        max-height: 300px;
        overflow-y: auto;
    }

    .st-form-main {
        padding: 30px 24px;
        overflow-y: auto;
    }

    .st-radio-cards {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .st-quick-addons {
        gap: 8px;
        flex-wrap: wrap;
    }

    .st-addon-pill {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .st-progress-line {
        width: 40px;
    }

    .st-progress-tracker {
        gap: 8px;
    }

    .st-progress-step span {
        font-size: 0.8rem;
    }

    .st-number-hint {
        display: none;
    }

    .st-language-count {
        padding: 16px;
    }

    .st-more-addons {
        gap: 20px;
    }

    .st-addon-group h5 {
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .st-cta-open-form {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .st-form-main {
        padding: 16px 12px;
    }

    .st-form-sidebar {
        padding: 16px 12px;
        max-height: 250px;
    }

    /* Progress Tracker - Mobile */
    .st-progress-tracker {
        padding: 12px 8px 20px;
        gap: 4px;
        margin-bottom: 16px;
    }

    .st-progress-step {
        flex-direction: column;
        gap: 4px;
    }

    .st-step-number {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-width: 2px;
    }

    .st-step-label {
        font-size: 0.7rem;
        margin-top: 4px;
        white-space: nowrap;
    }

    .st-progress-line {
        width: 30px;
        height: 2px;
        top: -17px;
        margin: 0 4px;
    }

    /* Form Header - Mobile */
    .st-form-header {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .st-form-title {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }

    .st-form-subtitle {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .st-form-main h3 {
        font-size: 1.15rem;
    }

    .st-step-description {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .st-radio-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .st-radio-card {
        padding: 16px;
    }

    .st-card-icon {
        font-size: 2rem;
    }

    .st-card-content h4 {
        font-size: 1rem;
    }

    .st-card-content p {
        font-size: 0.85rem;
    }

    .st-checkbox-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .st-checkbox-card {
        padding: 14px;
    }

    .st-quick-addons {
        gap: 6px;
    }

    .st-addon-pill {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .st-addon-icon {
        font-size: 1rem;
    }

    .st-language-count {
        padding: 12px;
        margin-top: 16px;
    }

    .st-number-picker {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .st-number-btn {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .st-number-picker input[type="number"] {
        width: 50px;
        height: 36px;
        font-size: 1rem;
    }

    .st-form-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .st-btn {
        width: 100%;
        padding: 14px;
        font-size: 0.95rem;
    }

    .st-form-modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }

    .st-form-layout {
        height: 100vh;
        max-height: none;
        display: flex;
        flex-direction: column;
    }

    .st-modal-close {
        right: 12px;
        top: 12px;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .st-progress-tracker {
        gap: 6px;
        padding: 16px;
    }

    .st-progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .st-progress-step span {
        font-size: 0.7rem;
    }

    .st-progress-line {
        width: 30px;
    }

    .st-subsection-title {
        font-size: 1rem;
    }

    .st-form-group label {
        font-size: 0.9rem;
    }

    .st-form-group input,
    .st-form-group select,
    .st-form-group textarea {
        font-size: 0.95rem;
        padding: 12px;
    }

    .st-expand-btn {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .st-more-addons {
        gap: 16px;
    }

    .st-addon-group {
        padding: 12px;
    }

    .st-checkbox-simple {
        font-size: 0.9rem;
        padding: 10px;
    }

    .st-services-grid-compact {
        grid-template-columns: 1fr;
    }

    .st-advanced-notice {
        padding: 12px;
        font-size: 0.85rem;
    }

    .st-summary-section h4 {
        font-size: 0.85rem;
    }

    .st-summary-value {
        font-size: 0.95rem;
    }

    .st-summary-list-item {
        font-size: 0.85rem;
        padding: 6px 0;
    }

    .st-progress-container {
        margin: 16px 0;
    }

    .st-progress-percent {
        font-size: 0.85rem;
    }
}
