/* ============================================
   AllStudent - Order Page Styles
   Blue Theme | Multi-step Form | Responsive
   ============================================ */

:root {
    --primary: #1a5fb4;
    --primary-light: #3584e4;
    --primary-dark: #0d3a7a;
    --accent: #26a269;
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fc;
    --bg-secondary2: #cdddff;
    --bg-dark: #0f172a;
    --text-primary: #1c1c1c;
    --text-secondary: #5e5e5e;
    --text-light: #8c8c8c;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}



main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--text-primary);
}

.header-phone {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.header-phone:hover {
    color: var(--primary);
}

/* Main Content */
.main {
    padding: 40px 0 80px;
}

.order-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    background: var(--bg-secondary2);
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step.active:not(:last-child)::after,
    .step.completed:not(:last-child)::after {
    background: var(--primary);
}

.step-number {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-light);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* Form Content */
.form-content {
    padding: 40px;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-align: left;
}

.form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
    text-align: left;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: left;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-primary);
    font-size: 15px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 76, 158, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235e5e5e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Range Slider */
.range-group {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-sm);
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.range-label {
    font-weight: 500;
    color: var(--text-primary);
}

.range-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 76, 158, 0.3);
    transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(15, 76, 158, 0.3);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(15, 76, 158, 0.02);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    fill: var(--primary);
}

.file-upload-text {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.file-name {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-remove {
    color: #e74c3c;
    cursor: pointer;
    font-weight: 700;
}

/* Price Info */
.price-info {
    background: linear-gradient(135deg, rgba(15, 76, 158, 0.05) 0%, rgba(53, 132, 228, 0.05) 100%);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 24px;
}

.price-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation Error - Absolute positioning to prevent field jumping */
.field-validation-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 6px;
    display: block;
    position: absolute;
    bottom: -22px;
    left: 0;
}

.form-group {
    position: relative;
    margin-bottom: 32px;
}

.input-validation-error {
    border-color: #e74c3c !important;
}

.input-validation-error:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1) !important;
}

/* Footer - Dark theme like default.aspx */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-phone {
    color: white;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-phone:hover {
    color: var(--primary-light);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    text-decoration: none;
}

.footer-logo span {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {

    gap: 24px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-disclaimer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-disclaimer p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Autocomplete dropdown styles */
.autocomplete-suggestions {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
}

.autocomplete-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.autocomplete-selected {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .form-content {
        padding: 24px;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .progress-steps {
        padding: 16px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .promo-group {
        justify-content: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .step:not(:last-child)::after {
        top: 16px;
    }
}

/* Social Network Toggle */
.social-toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-group {
    flex: 1;
}

.promo-group {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 0;
}

.social-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: #e0e0e0;
    color: #666;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.social-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.social-btn.active {
    border-color: transparent !important;
    color: white;
}

.social-btn:focus {
    outline: none;
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

.social-btn.max-btn svg {
    width: 16px;
    height: 16px;
}

.social-btn.whatsapp-btn.active {
    background-color: #29A71A;
    color: #fff;
}

.social-btn.telegram-btn.active {
    background-color: #039BE5;
    color: #ffffff;
}

.social-btn.max-btn.active {
    background: linear-gradient(to top right, #4BC2FD, #3E46EB, #8B50E9);
    color: #ffffff;
}

#datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
}

.telegram-input {
    margin-top: 10px;
}

.promo-link {
    display: inline;
    padding: 0;
    color: var(--primary);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    background: transparent;
    border: 0;
    text-decoration: underline;
}

.promo-link:hover {
    color: var(--primary-dark);
}
