/**
 * Application Status Guard Widget Styles
 * Add this to: assets/css/singpass-elementor-widgets.css
 */

/* Application Status Guard Widget */
.elementor-widget-singpass_application_status_guard {
    position: relative;
}

.application-status-guard-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Status Notice Styles */
.application-status-notice {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.application-status-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.application-status-notice:hover::before {
    opacity: 1;
}

/* Notice Type Variations */
.notice-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #d1ecf1 100%);
    border-left-color: #0073aa;
    color: #0073aa;
}

.notice-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left-color: #f4333d;
    color: #856404;
}

.notice-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

.notice-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
    color: #155724;
}

/* Notice Content */
.notice-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.notice-icon {
    margin-right: 15px;
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-icon i {
    display: block;
}

.notice-text {
    flex: 1;
    line-height: 1.6;
}

.notice-text p {
    margin: 0 0 10px 0;
}

.notice-text p:last-child {
    margin-bottom: 0;
}

/* Application Details */
.application-details {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.application-details p {
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 5px 0px;
}

.application-details p:last-child{
    border-bottom: 0px;
}

.application-details strong {
    margin-right: 10px;
    min-width: 80px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.status-submitted {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: #ffffff;
    border-color: #1976d2;
}

.status-under_review {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
    border-color: #f57c00;
    animation: reviewPulse 2s ease-in-out infinite;
}

.status-offers_received {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    border-color: #8e24aa;
    animation: offerGlow 3s ease-in-out infinite;
}

.status-offer_accepted {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-color: #388e3c;
    animation: acceptedPulse 2s ease-in-out infinite;
}

.status-processing {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #ef6c00;
    border-color: #f57c00;
}

/* Status Badge Animations */
@keyframes reviewPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 108, 0, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(239, 108, 0, 0.1); }
}

@keyframes offerGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(123, 31, 162, 0.3); }
    50% { box-shadow: 0 0 15px rgba(123, 31, 162, 0.6); }
}

@keyframes acceptedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Action Buttons */
.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f4333d 0%, #d32f2f 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

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

.action-buttons .button:hover::before {
    width: 300px;
    height: 300px;
}

.action-buttons .button:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transform: translateY(-3px) scale(1.02);
}

.action-buttons .button:active {
    transform: translateY(-1px) scale(0.98);
}

.action-buttons .button i {
    font-size: 16px;
}

/* Login Button Variation */
.login-button {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3) !important;
}

.login-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%) !important;
    box-shadow: 0 8px 25px rgba(0, 115, 170, 0.4) !important;
}

/* View Application Button */
.view-application-button {
    background: linear-gradient(135deg, #23b5b5 0%, #425aad 100%) !important;
}

.view-application-button:hover {
    background: #425aad !important;
}

/* Ready to Apply Message */
.ready-to-apply {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border: 1px solid #28a745;
}

.ready-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    color: #155724;
    font-weight: 600;
    font-size: 16px;
}

.ready-message i {
    font-size: 20px;
    color: #28a745;
}

/* Loading States */
.application-status-guard-widget.loading {
    pointer-events: none;
    opacity: 0.7;
}

.application-status-guard-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f4333d;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .application-status-notice {
        padding: 15px;
        border-radius: 8px;
    }
    
    .notice-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notice-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .application-details {
        padding: 12px;
    }
    
    .application-details p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .application-details strong {
        min-width: auto;
        margin-right: 0;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons .button {
        justify-content: center;
        padding: 14px 20px;
        border-radius: 12px;
    }
    
    .ready-message {
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .application-status-notice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .notice-text {
        font-size: 14px;
    }
    
    .application-details {
        margin-top: 12px;
        padding: 10px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .action-buttons .button {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .application-status-notice {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
    }
    
    .notice-info {
        background: linear-gradient(135deg, #1a3a52 0%, #2c5f7a 100%);
        color: #87ceeb;
    }
    
    .notice-warning {
        background: linear-gradient(135deg, #4a3728 0%, #6b4d32 100%);
        color: #ffd700;
    }
    
    .notice-error {
        background: linear-gradient(135deg, #4a2c32 0%, #6b3d44 100%);
        color: #ff6b6b;
    }
    
    .notice-success {
        background: linear-gradient(135deg, #2d4a32 0%, #3d5d42 100%);
        color: #90ee90;
    }
    
    .application-details {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .ready-to-apply {
        background: linear-gradient(135deg, #2d4a32 0%, #3d5d42 100%);
        border-color: #4caf50;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .application-status-notice {
        border: 2px solid;
        border-left-width: 6px;
    }
    
    .action-buttons .button {
        border: 2px solid currentColor;
    }
    
    .status-badge {
        border-width: 2px;
        font-weight: 700;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .application-status-notice,
    .action-buttons .button,
    .status-badge {
        transition: none !important;
        animation: none !important;
    }
    
    .application-status-notice:hover {
        transform: none !important;
    }
    
    .action-buttons .button:hover {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .application-status-guard-widget {
        background: white !important;
        color: black !important;
    }
    
    .application-status-notice {
        background: white !important;
        color: black !important;
        border: 2px solid black !important;
        box-shadow: none !important;
    }
    
    .action-buttons {
        display: none !important;
    }
    
    .status-badge {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
}

/* Focus Styles for Accessibility */
.action-buttons .button:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Animation Classes for JavaScript */
.application-status-notice.animate-in {
    animation: slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-buttons .button.clicked {
    animation: buttonPulse 0.3s ease;
}

@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}