/* IACT Partnership Form Styles - Paginated Version */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

/* Test Mode Styles */
.test-mode-container {
    margin-top: 20px;
    text-align: center;
}

.test-mode-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.test-mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.test-mode-info {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-mode-badge {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.test-fill-btn, .test-clear-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-fill-btn:hover {
    background: #4caf50;
    color: white;
}

.test-clear-btn:hover {
    background: #f44336;
    color: white;
}

/* Test Mode Active State */
body.test-mode {
    position: relative;
}

body.test-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ff6b35);
    background-size: 200% 100%;
    animation: testModeStripe 3s linear infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes testModeStripe {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress Bar Styles */
.progress-container {
    background: white;
    padding: 30px 40px;
    border-bottom: 1px solid #e0e6ed;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e6ed;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 16.67%; /* Start at step 1 */
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e6ed;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

.step.completed .step-number {
    background: #4caf50;
    color: white;
}

.step.completed .step-label {
    color: #4caf50;
}

.step.completed .step-number::before {
    content: '✓';
    font-size: 16px;
}

/* Form Container */
.form-container {
    padding: 40px;
    min-height: 500px;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-step.slide-in {
    animation: slideInRight 0.3s ease forwards;
}

.form-step.slide-out {
    animation: slideOutLeft 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.section {
    margin-bottom: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 600;
}

.step-description {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input.error, select.error, textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    border-color: #667eea;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.range-container {
    margin-top: 10px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e6ed;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

/* Navigation Styles */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border-top: 3px solid #667eea;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.prev-btn {
    background: #6c757d;
    color: white;
}

.prev-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.next-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.nav-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.step-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e0e6ed;
}

/* Message Styles */
.success-message, .error-message {
    border-radius: 15px;
    margin: 25px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    animation: slideInDown 0.5s ease-out;
}

.success-message {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

.success-message h3, .error-message h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
}

.success-message .submission-id {
    background: #c3e6cb;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.success-message .submission-id span {
    font-family: monospace;
    background: #155724;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.error-message button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #721c24;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-message button:hover {
    background: #5a161f;
}

.error-message a {
    color: #721c24;
    text-decoration: underline;
}

/* Validation Error Styles */
.field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.error-summary {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-summary h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.error-summary ul {
    margin: 0;
    padding-left: 20px;
}

.error-summary li {
    margin-bottom: 5px;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.nav-btn.loading {
    position: relative;
    color: transparent;
}

.nav-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row.three {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header {
        padding: 30px 20px;
    }

    .progress-container {
        padding: 20px;
    }

    .form-container {
        padding: 20px;
    }

    .section {
        padding: 20px;
        margin-bottom: 15px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .form-navigation .step-info {
        order: -1;
    }

    .nav-btn {
        width: 100%;
        min-width: auto;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step {
        flex: 0 0 calc(33.333% - 7px);
        min-width: 80px;
    }

    .step-label {
        font-size: 10px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .step {
        flex: 0 0 calc(50% - 5px);
    }

    .step-label {
        font-size: 9px;
    }

    .test-mode-info {
        flex-direction: column;
        gap: 8px;
    }

    .test-fill-btn, .test-clear-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        background: white;
    }

    .header {
        background: #2c3e50;
        color: white;
    }

    .progress-container,
    .form-navigation {
        display: none;
    }

    .form-step {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .success-message, .error-message {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .container {
        border: 2px solid #000;
    }

    input, select, textarea {
        border: 2px solid #000;
    }

    .nav-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .form-step {
        transition: none;
    }
}