/**
 * WVU Press Cart Redirect Modal Styles
 * 
 * Matches Drupal jQuery UI dialog styling
 * 
 * @package wvupress-wordpress-theme
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */

.cart-redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   MODAL CONTAINER
   ============================================ */

.cart-redirect-modal {
    width: 300px;
    max-width: 300px;
    background-color: var(--wp--preset--color--content-background, #ffffff);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-family: var(--wp--preset--font-family--system, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

/* ============================================
   MODAL HEADER
   ============================================ */

.modal-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    padding: 10px 15px;
}

.modal-title {
    font-size: var(--wp--preset--font-size--medium, 16px);
    font-weight: 600;
    color: #333333;
    text-align: center;
    display: block;
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.modal-content {
    padding: 20px 15px;
    background-color: var(--wp--preset--color--content-background, #ffffff);
}

.modal-content p {
    margin: 0 0 10px 0;
    color: #333333;
    font-size: var(--wp--preset--font-size--small, 14px);
    line-height: 1.4;
}

.modal-content p:last-child {
    margin-bottom: 0;
}

.modal-disclaimer {
    font-size: var(--wp--preset--font-size--small, 12px);
    color: #666666;
    font-style: italic;
}

/* ============================================
   MODAL BUTTONS
   ============================================ */

.modal-buttons {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    justify-content: center;
}

.btn-continue,
.btn-cancel {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: var(--wp--preset--font-size--small, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Continue button - blue */
.btn-continue {
    background-color: var(--wp--preset--color--theme-blue, #203E90);
    color: #ffffff;
}

.btn-continue:hover {
    background-color: #001a36;
}

/* Cancel button - blue (matching Drupal) */
.btn-cancel {
    background-color: var(--wp--preset--color--theme-blue, #203E90);
    color: #ffffff;
}

.btn-cancel:hover {
    background-color: #001a36;
}

/* Focus styles for accessibility */
.btn-continue:focus,
.btn-cancel:focus {
    outline: 2px solid #cc9900;
    outline-offset: 2px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .cart-redirect-modal {
        width: 300px;
        max-width: 90%;
    }
    
    .modal-buttons {
        flex-direction: row;
    }
    
    .btn-continue,
    .btn-cancel {
        flex: 0 0 auto;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .cart-redirect-overlay {
        animation: none;
        opacity: 1;
    }
}
