/* Form Specific Styles */
.form-header-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-light);
}

.form-header-content {
    text-align: center;
}

.form-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
}

.form-icon .tractor-icon {
    width: 30px;
    height: 30px;
    color: white;
}

.form-main-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.form-section {
    padding: 60px 0;
    background: var(--background-light);
    min-height: 70vh;
}

.ccir-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-step {
    display: none;
    background: white;
    border-radius: var(--border-radius-large);
    padding: 40px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.form-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
}

.active-step {
    display: block;
    animation: slideInUp 0.4s ease forwards;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 16px;
    flex-shrink: 0;
    font-size: 16px;
    transition: var(--transition);
}

.step-indicator.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(64, 84, 178, 0.1);
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.form-content {
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.input-group {
    margin-bottom: 24px;
}

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

.required {
    color: var(--danger-color);
    font-weight: 600;
}

.modern-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: white;
    font-family: inherit;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 84, 178, 0.1);
}

.modern-input:invalid {
    border-color: var(--danger-color);
}

.modern-input[readonly] {
    background-color: var(--background-light);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.radio-option:hover {
    background-color: var(--background-light);
}

.radio-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-design {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-input:checked + .radio-design {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.radio-input:checked + .radio-design::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

.radio-label {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
}

.dual-buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.modern-button {
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.modern-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modern-button:hover::before {
    left: 100%;
}

.modern-button.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: var(--shadow-light);
}

.modern-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.modern-button.secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--border-light);
}

.modern-button.secondary:hover {
    background-color: #e4e8f4;
    border-color: var(--primary-color);
}

.modern-button.success {
    background: linear-gradient(135deg, var(--success-color), #3d8b40);
    color: white;
    box-shadow: var(--shadow-light);
}

.modern-button.success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.button-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.data-card {
    background: linear-gradient(135deg, var(--background-light), #f0f2f8);
    border-radius: var(--border-radius-large);
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--border-light);
    position: relative;
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '📋';
    font-size: 16px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.data-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.data-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.data-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.success-card {
    background: linear-gradient(135deg, #f1f8e9, #e8f5e8);
    border-radius: var(--border-radius-large);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid #c8e6c9;
    position: relative;
    overflow: hidden;
}

.success-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success-color);
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    position: relative;
    z-index: 2;
}

.success-icon svg {
    width: 30px;
    height: 30px;
}

.success-title {
    font-size: 22px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.success-content {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.highlight {
    margin-top: 12px;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
}

.warning-alert {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-top: 16px;
    color: #e65100;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #ffcc02;
    position: relative;
    z-index: 2;
}

.warning-alert svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Loading Section Styles */
.loading-section {
    text-align: center;
}

.loading-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

.loading-animation {
    margin-bottom: 40px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-svg {
    width: 100%;
    height: 100%;
    animation: rotate 2s linear infinite;
}

.spinner-circle {
    stroke: var(--primary-color);
    stroke-linecap: round;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

.loading-progress {
    margin-top: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 4px;
    animation: progress 3s ease-in-out forwards;
}

.progress-text {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.loading-messages {
    margin-top: 30px;
    text-align: left;
}

.loading-message {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    opacity: 0;
    transform: translateY(10px);
    animation: messageFadeIn 0.5s forwards;
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
}

.loading-message:nth-child(1) {
    animation-delay: 0.5s;
}

.loading-message:nth-child(2) {
    animation-delay: 1.5s;
}

.loading-message:nth-child(3) {
    animation-delay: 2.5s;
}

.loading-message.active {
    background-color: #e8f0fe;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    box-shadow: var(--shadow-light);
}

.message-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Honeypot - hidden field for spam protection */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

@keyframes progress {
    0% { width: 0; }
    30% { width: 30%; }
    60% { width: 70%; }
    100% { width: 100%; }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-step {
        padding: 24px;
    }
    
    .form-grid,
    .data-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dual-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .modern-button {
        width: 100%;
        min-width: auto;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .step-indicator {
        margin-right: 0;
    }
    
    .form-main-title {
        font-size: 22px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .success-card {
        padding: 20px;
    }
    
    .ccir-form-container {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 40px 0;
    }
    
    .form-header-section {
        padding: 30px 0;
    }
    
    .form-main-title {
        font-size: 20px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .modern-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .loading-messages {
        margin-top: 20px;
    }
    
    .loading-message {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    .loading-section,
    .form-actions {
        display: none;
    }
    
    .form-step {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

