/* Apply Trial Modal Styles */

/* Modal Overlay */
.apply-trial-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apply-trial-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.apply-trial-modal {
    background: var(--surface);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.apply-trial-modal-overlay.active .apply-trial-modal {
    transform: translateY(0);
}

/* Modal Header */
.apply-trial-modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.apply-trial-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    z-index: 1;
}

.apply-trial-modal-close:hover {
    color: var(--text-primary);
}

.apply-trial-modal-close svg {
    width: 24px;
    height: 24px;
}

.apply-trial-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.apply-trial-modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Step Indicator */
.apply-trial-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
}

.apply-trial-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apply-trial-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: var(--border);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.apply-trial-step.active .apply-trial-step-number {
    background: var(--primary);
    color: white;
}

.apply-trial-step.completed .apply-trial-step-number {
    background: #10B981;
    color: white;
}

.apply-trial-step-label {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.apply-trial-step.active .apply-trial-step-label {
    color: var(--text-primary);
    font-weight: 500;
}

.apply-trial-step-connector {
    width: 40px;
    height: 2px;
    background: var(--border);
}

.apply-trial-step-connector.active {
    background: var(--primary);
}

/* Modal Body */
.apply-trial-modal-body {
    padding: 0 24px 24px;
}

/* Form Groups */
.apply-trial-form-group {
    margin-bottom: 20px;
}

.apply-trial-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.apply-trial-form-group label .required {
    color: #EF4444;
    margin-left: 2px;
}

.apply-trial-form-group .hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.apply-trial-form-group input,
.apply-trial-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--background);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.apply-trial-form-group input:focus,
.apply-trial-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.apply-trial-form-group input.error,
.apply-trial-form-group textarea.error {
    border-color: #EF4444;
}

.apply-trial-form-group .error-message {
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
}

.apply-trial-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.apply-trial-form-group input::placeholder,
.apply-trial-form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Verification Code Section */
.apply-trial-verification-section {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.apply-trial-verification-section .apply-trial-form-group {
    flex: 1;
    margin-bottom: 0;
}

.apply-trial-verification-section .apply-trial-form-group input {
    border-radius: 8px;
}

.apply-trial-btn-code {
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-trial-btn-code:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.apply-trial-btn-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-trial-btn-code.counting {
    background: var(--border);
    color: var(--text-secondary);
    border-color: var(--border);
}

/* Form Actions */
.apply-trial-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.apply-trial-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.apply-trial-btn-primary {
    background: var(--primary);
    color: white;
}

.apply-trial-btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.apply-trial-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-trial-btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.apply-trial-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Success State */
.apply-trial-success {
    text-align: center;
    padding: 40px 24px;
}

.apply-trial-success-icon {
    width: 64px;
    height: 64px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.apply-trial-success-icon svg {
    width: 32px;
    height: 32px;
    color: #10B981;
}

.apply-trial-success h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.apply-trial-success p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Toast Notification */
.apply-trial-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--surface);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.apply-trial-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.apply-trial-toast.success {
    background: #10B981;
    color: white;
}

.apply-trial-toast.error {
    background: #EF4444;
    color: white;
}

/* Hide Steps */
.apply-trial-step-content {
    display: none;
}

.apply-trial-step-content.active {
    display: block;
}

/* Loading State */
.apply-trial-btn.loading {
    position: relative;
    color: transparent;
}

.apply-trial-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: apply-trial-spin 0.8s linear infinite;
}

@keyframes apply-trial-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .apply-trial-modal {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .apply-trial-modal-header {
        padding: 20px 20px 0;
    }

    .apply-trial-modal-title {
        font-size: 20px;
    }

    .apply-trial-modal-body {
        padding: 0 20px 20px;
    }

    .apply-trial-form-actions {
        flex-direction: column;
    }

    .apply-trial-step-label {
        display: none;
    }

    .apply-trial-verification-section {
        flex-direction: column;
    }

    .apply-trial-btn-code {
        width: 100%;
    }
}
