/**
 * Halcyon Message Handler Styles
 * Provides consistent message styling across all Halcyon plugins
 */

/* Session-based messages (PHP rendered) */
.halcyon-message {
    margin-bottom: 20px;
    font-weight: bold;
    border-radius: 8px;
    padding: 15px 20px;
    position: relative;
    animation: halcyon-fade-in 0.3s ease-in;
}

/* Payment message specific styling */
.halcyon-message.payment-message {
    margin-bottom: 20px;
    font-weight: bold;
}

/* Mobile adjustments for payment messages */
@media (max-width: 767.98px) {
    .halcyon-message.payment-message {
        margin-top: 60px;
        z-index: 999;
        position: relative;
    }
}

/* JavaScript message banner (fixed position) */
.halcyon-message-banner {
    position: fixed;
    top: 70px; /* Adjusted to appear below navbar */
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    z-index: 9999;
    display: none;
    font-weight: bold;
    animation: halcyon-slide-down 0.3s ease-out;
}

/* Success messages */
.halcyon-message-banner.success,
.halcyon-message.alert-success {
    background-color: #00fbf4;
    color: #000;
    border: 2px solid #00d9d3;
}

/* Error/Danger messages */
.halcyon-message-banner.error,
.halcyon-message-banner.danger,
.halcyon-message.alert-danger {
    background-color: #ff3b30;
    color: #fff;
    border: 2px solid #e6342b;
}

/* Warning messages */
.halcyon-message-banner.warning,
.halcyon-message.alert-warning {
    background-color: #ffc107;
    color: #000;
    border: 2px solid #e6ad00;
}

/* Info messages */
.halcyon-message-banner.info,
.halcyon-message.alert-info {
    background-color: #17a2b8;
    color: #fff;
    border: 2px solid #138496;
}

/* Close button for dismissible messages */
.halcyon-message .btn-close,
.halcyon-message-banner .btn-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.halcyon-message .btn-close:hover,
.halcyon-message-banner .btn-close:hover {
    opacity: 1;
}

/* Dark background for error close button */
.halcyon-message.alert-danger .btn-close,
.halcyon-message-banner.error .btn-close,
.halcyon-message-banner.danger .btn-close {
    color: #fff;
}

/* Animations */
@keyframes halcyon-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes halcyon-slide-down {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Loading overlay (used during form submissions) */
#htf-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

#htf-loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Ensure messages appear above other content */
body.has-halcyon-messages {
    padding-top: 20px;
}

/* Modal message styling */
.modal .halcyon-message {
    margin-bottom: 15px;
}

/* Inline form messages */
.form-group .halcyon-message,
.mb-3 .halcyon-message {
    margin-bottom: 10px;
    font-size: 0.9rem;
    padding: 10px 15px;
}

/* Dashboard-specific message styling */
.dashboard-message {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Ensure consistent spacing */
.landing-container > .halcyon-message:first-child,
.content-container > .halcyon-message:first-child {
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .halcyon-message-banner {
        top: 60px; /* Adjust for mobile navbar */
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .halcyon-message {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}

/* Print styles */
@media print {
    .halcyon-message-banner,
    #htf-loading-overlay {
        display: none !important;
    }
} 