/* =============================================
   Enhanced application-form.css with improved UX
   ============================================= */

.p94-wp-form-wrapper * {
    box-sizing: border-box;
}

.p94-wp-form-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.p94-application-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.p94-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.p94-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: p94-float 20s ease-in-out infinite;
}

@keyframes p94-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.p94-header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.p94-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.p94-tabs-nav {
    display: flex;
    background: #f1f3f4;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
}

.p94-tab-button {
    flex: 1;
    min-width: 150px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.p94-tab-button:hover {
    background: rgba(66, 133, 244, 0.1);
    color: #4285f4;
    transform: translateY(-1px);
}

.p94-tab-button.active {
    background: white;
    color: #1e3c72;
    border-bottom: 3px solid #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.p94-tab-button.completed {
    color: #0f9d58;
    background: rgba(15, 157, 88, 0.05);
}

.p94-tab-button.completed::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #0f9d58;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: p94-checkmark 0.5s ease;
}

@keyframes p94-checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.p94-tab-content {
    display: none;
    padding: 40px;
    min-height: 500px;
    opacity: 0;
    transform: translateY(20px);
}

.p94-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: p94-fadeInUp 0.4s ease;
}

@keyframes p94-fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.p94-form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
}

.p94-form-row.two-col { grid-template-columns: 1fr 1fr; }
.p94-form-row.three-col { grid-template-columns: 1fr 1fr 1fr; }
.p94-form-row.four-col { grid-template-columns: 2fr 1fr 1fr 1fr; }

.p94-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.p94-form-group.focused {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.p94-form-group label {
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.p94-form-group.focused label {
    color: #4285f4;
}

.p94-form-group input,
.p94-form-group select,
.p94-form-group textarea {
    padding: 12px 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.p94-form-group input:focus,
.p94-form-group select:focus,
.p94-form-group textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

.p94-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.p94-required {
    color: #ea4335;
}

.p94-checkbox-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.p94-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.p94-checkbox-item:hover {
    background: rgba(66, 133, 244, 0.05);
}

.p94-checkbox-item input[type="radio"],
.p94-checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.p94-employment-block,
.p94-reference-block {
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e8eaed;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.p94-employment-block::before,
.p94-reference-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.05), transparent);
    transition: left 0.6s ease;
}

.p94-employment-block:hover::before,
.p94-reference-block:hover::before {
    left: 100%;
}

.p94-employment-block:hover,
.p94-reference-block:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
}

.p94-block-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaed;
    position: relative;
}

.p94-block-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #4285f4;
}

.p94-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e8eaed;
    position: sticky;
    bottom: 0;
    z-index: 50;
}

.p94-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.p94-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.p94-btn:hover::before {
    width: 200px;
    height: 200px;
}

.p94-btn-primary {
    background: linear-gradient(135deg, #4285f4 0%, #1e3c72 100%);
    color: white;
}

.p94-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
}

.p94-btn-secondary {
    background: #e8eaed;
    color: #5f6368;
}

.p94-btn-secondary:hover {
    background: #dadce0;
    transform: translateY(-1px);
}

.p94-btn-success {
    background: linear-gradient(135deg, #0f9d58 0%, #0b8043 100%);
    color: white;
    font-size: 16px;
    padding: 15px 30px;
}

.p94-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 157, 88, 0.3);
}

.p94-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.p94-progress-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5f6368;
    font-size: 14px;
}

.p94-progress-bar {
    width: 200px;
    height: 8px;
    background: #e8eaed;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.p94-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #0f9d58);
    transition: width 0.5s ease;
    border-radius: 4px;
    position: relative;
}

.p94-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: p94-shine 2s infinite;
}

@keyframes p94-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.p94-disclaimer {
    background: linear-gradient(145deg, #fef7e0 0%, #fff9e6 100%);
    border: 1px solid #fbbc04;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(251, 188, 4, 0.1);
}

.p94-success-message {
    background: linear-gradient(135deg, #0f9d58 0%, #0b8043 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    display: none;
    animation: p94-slideInUp 0.6s ease;
    box-shadow: 0 10px 30px rgba(15, 157, 88, 0.2);
}

@keyframes p94-slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.p94-success-message h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.p94-error-message {
    background: linear-gradient(145deg, #fce8e6 0%, #fdf2f2 100%);
    color: #d93025;
    border: 1px solid #ea4335;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    display: none;
    animation: p94-shake 0.5s ease;
}

@keyframes p94-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.p94-shake {
    animation: p94-shake 0.5s ease;
}

/* Loading state */
.p94-btn-success:disabled {
    background: #ccc;
    position: relative;
}

.p94-btn-success:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: p94-spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes p94-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .p94-form-row.two-col,
    .p94-form-row.three-col,
    .p94-form-row.four-col {
        grid-template-columns: 1fr;
    }
    
    .p94-tabs-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .p94-tab-button {
        min-width: 120px;
        flex: none;
        font-size: 12px;
        padding: 16px 12px;
    }
    
    .p94-tab-content {
        padding: 20px;
    }
    
    .p94-navigation {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .p94-progress-bar {
        width: 150px;
    }
    
    .p94-header h1 {
        font-size: 1.8rem;
    }
    
    .p94-employment-block,
    .p94-reference-block {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .p94-tabs-nav,
    .p94-navigation {
        display: none;
    }
    
    .p94-tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .p94-application-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

.p94-success-message {
    background: linear-gradient(135deg, #0f9d58 0%, #0b8043 100%);
    color: white;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(15, 157, 88, 0.2);
    position: relative;
    overflow: hidden;
    animation: p94-slideInUp 0.6s ease;
}

.p94-success-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: p94-float 20s ease-in-out infinite;
}

.p94-success-message h2 {
    margin: 0;
    font-weight: 700;
}

.p94-success-message p {
    margin: 10px 0;
}

/* Slide in animation */
@keyframes p94-slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Floating background animation */
@keyframes p94-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

/* Application ID highlight */
#applicationId {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}
