/**
 * Feedback styles for Shemeza Safari Escapes
 * Includes toast notifications, confirmation dialogs, success messages,
 * form validation, page loaders, and Uganda-themed feedback elements
 */

/* Toast notifications container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

/* Toast notification */
.toast {
    display: flex;
    align-items: flex-start;
    background-color: var(--card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 15px;
    transform: translateX(120%);
    transition: transform 0.3s ease-out;
    overflow: hidden;
    border-left: 4px solid var(--primary-color, #795548);
}

.toast.show {
    transform: translateX(0);
}

.toast.hiding {
    transform: translateX(120%);
}

/* Toast types */
.toast-success {
    border-left-color: #4CAF50;
}

.toast-error {
    border-left-color: #F44336;
}

.toast-warning {
    border-left-color: #FF9800;
}

.toast-info {
    border-left-color: #2196F3;
}

/* Toast components */
.toast-icon {
    flex-shrink: 0;
    margin-right: 12px;
    font-size: 20px;
}

.toast-success .toast-icon {
    color: #4CAF50;
}

.toast-error .toast-icon {
    color: #F44336;
}

.toast-warning .toast-icon {
    color: #FF9800;
}

.toast-info .toast-icon {
    color: #2196F3;
}

.toast-content {
    flex-grow: 1;
}

.toast-content p {
    margin: 0;
    color: var(--text-color, #333);
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-color-muted, #777);
    cursor: pointer;
    font-size: 14px;
    margin-left: 8px;
    padding: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-color, #333);
}

/* Confirmation dialog */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    width: 90%;
    max-width: 400px;
    background-color: var(--card-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.confirm-modal.show .confirm-dialog {
    transform: scale(1);
}

.confirm-content {
    padding: 25px;
}

.confirm-message {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color, #333);
    text-align: center;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form success message */
.form-success {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--card-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-out;
}

.success-icon {
    font-size: 60px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.form-success h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color, #795548);
}

.form-success p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color, #333);
    margin-bottom: 20px;
}

.redirect-message {
    font-size: 14px;
    color: var(--text-color-muted, #777);
    font-style: italic;
}

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

/* Page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color, #fff);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: opacity 0.3s ease-out;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(var(--primary-color-rgb, 121, 85, 72), 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color, #795548);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

#loader-message {
    font-size: 16px;
    color: var(--text-color, #333);
    font-weight: 500;
}

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

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

/* Form validation styles */
input.error,
textarea.error,
select.error {
    border-color: var(--error-color, #F44336) !important;
    background-color: rgba(244, 67, 54, 0.05);
}

.error-message {
    display: none;
    color: var(--error-color, #F44336);
    font-size: 0.85rem;
    margin-top: 5px;
    align-items: center;
    gap: 5px;
}

.error-message i {
    font-size: 14px;
}

/* Character counter */
.char-counter {
    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 12px;
    color: var(--text-color-muted, #777);
}

.char-counter.limit-reached {
    color: var(--error-color, #F44336);
    font-weight: bold;
}

/* Button loading state */
button .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Uganda-themed success message */
.uganda-success {
    position: relative;
    padding: 30px;
    border-radius: 10px;
    background-color: var(--card-bg, #fff);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: left;
    overflow: hidden;
}

.uganda-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #000000, #ffff00, #ff0000);
    /* Uganda flag colors: black, yellow, red */
}

.uganda-success .success-icon {
    font-size: 50px;
    color: #4CAF50;
    margin-bottom: 20px;
    display: block;
}

.uganda-success h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color, #795548);
}

.uganda-success p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color, #333);
    margin-bottom: 20px;
}

.uganda-success .reference {
    background-color: rgba(var(--primary-color-rgb, 121, 85, 72), 0.1);
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-color, #795548);
}

.uganda-highlight {
    background-color: rgba(255, 204, 0, 0.1); /* Light yellow background */
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    border-left: 3px solid #ffcc00; /* Yellow border - Uganda flag color */
}

.uganda-highlight h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color, #795548);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.uganda-highlight p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 0;
}

.next-steps {
    background-color: rgba(76, 175, 80, 0.1); /* Light green background */
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.next-steps h4 {
    font-family: 'Playfair Display', serif;
    color: #4CAF50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.next-steps li:last-child {
    margin-bottom: 0;
}

.success-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.success-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.success-actions .btn-primary {
    background-color: var(--primary-color, #795548);
    color: white;
}

.success-actions .btn-primary:hover {
    background-color: var(--primary-color-dark, #5D4037);
    transform: translateY(-2px);
}

.success-actions .btn-outline {
    background-color: transparent;
    color: var(--primary-color, #795548);
    border: 1px solid var(--primary-color, #795548);
}

.success-actions .btn-outline:hover {
    background-color: rgba(var(--primary-color-rgb, 121, 85, 72), 0.1);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .confirm-content {
        padding: 20px;
    }
    
    .uganda-success {
        padding: 20px;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .loader-logo {
        width: 80px;
    }
    
    .loader-spinner {
        width: 40px;
        height: 40px;
    }
}
