/**
 * Front-end styles
 *
 * @package MyEventsPro
 */

/* General styles */
.mep-form-wrapper,
.mep-user-dashboard-wrapper {
    max-width: 800px;
    margin: 20px auto; /* Added top/bottom margin */
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #fff; /* Add a background for better stand-out on some themes */
    border: 1px solid #e5e5e5; /* Optional border */
    border-radius: 4px;
}

.mep-form-title,
.mep-dashboard-title {
    margin-top: 0; /* Adjust if it's inside the wrapper */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-size: 1.5em; /* Consistent title size */
}

/* Event details box in registration form & dashboard */
.mep-event-details-box, /* For dashboard single view */
.mep-registration-details-box, /* For dashboard single view */
.mep-event-details { /* For registration form */
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.mep-event-details-box h3,
.mep-registration-details-box h3 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1.2em;
    color: #333;
}


/* Form styles */
.mep-form {
    margin-bottom: 30px;
}

.mep-form-row {
    margin-bottom: 15px;
}

.mep-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
}

.mep-form-row input[type="text"],
.mep-form-row input[type="email"],
.mep-form-row input[type="number"],
.mep-form-row input[type="date"], /* Added date for consistency */
.mep-form-row input[type="time"], /* Added time for consistency */
.mep-form-row textarea,
.mep-form-row select {
    width: 100%;
    padding: 10px; /* Slightly more padding */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.mep-form-row input[type="number"].mep-price-input { /* Verhoogde specificiteit */
    width: 80px;
    max-width: 100px;
}

.mep-form-row input:focus,
.mep-form-row textarea:focus,
.mep-form-row select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}


.mep-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #555;
}

.mep-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* Override 100% width for checkbox */
}

/* Payment Methods Selection */
.mep-payment-methods { /* Container voor alle betaalopties */
    display: flex;
    flex-direction: column; /* Zet elke betaaloptie onder elkaar */
    gap: 15px; /* Ruimte tussen de betaalopties */
    margin-bottom: 15px;
}

label.mep-payment-method { /* Het label dat de hele betaaloptie omvat */
    display: block; /* Maak het een block-level element voor de padding/border */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
}

label.mep-payment-method:hover {
    background-color: #f0f0f0;
}

/* Container voor de radio button en zijn directe tekstlabel */
.mep-payment-option-header {
    display: flex;
    align-items: center; /* Lijn radio en tekst verticaal uit */
    margin-bottom: 5px; /* Ruimte tussen header en beschrijving */
}

.mep-payment-option-header input[type="radio"] {
    margin-right: 10px; /* Ruimte tussen radio en tekst */
    /* Voeg hier eventueel custom styling voor de radio button zelf toe,
       maar standaard browser styling is vaak prima. */
}

.mep-payment-option-header .mep-payment-label {
    font-weight: normal; /* Standaard gewicht */
}

label.mep-payment-method input[type="radio"]:checked + .mep-payment-option-header .mep-payment-label {
    font-weight: bold; /* Maak label vet als geselecteerd */
}

.mep-payment-description {
    margin-left: 28px; /* Lijn uit met de tekst na de radio button (pas aan op basis van radio grootte + margin) */
    font-size: 0.9em;
    color: #666;
}

/* Selected payment method */
.mep-payment-method input[type="radio"]:checked + .mep-payment-method-details .mep-payment-label {
    color: #0073aa;
}
.mep-payment-method input[type="radio"]:checked + .mep-payment-method-details {
    /* Optional: Add a visual cue to the whole details block */
}
.mep-form-wrapper .mep-payment-method input[type="radio"]:checked, /* Ensure higher specificity if needed */
#mep-registration-form .mep-payment-method input[type="radio"]:checked {
    /* Styles for checked radio button itself, if desired (often browser-styled) */
}



.mep-submit-button,
.mep-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em; /* Unified font size */
    line-height: 1.5;
    transition: background-color 0.2s ease-in-out;
}

.mep-submit-button:hover,
.mep-button:hover {
    background-color: #005a87; /* Darker shade */
}

.mep-button-primary { /* Already covered by .mep-button */ }

.mep-button-secondary {
    background-color: #b59365;
}
.mep-button-secondary:hover {
    background-color: #b89248;
}


.mep-button-cancel {
    background-color: #d63638;
}

.mep-button-cancel:hover {
    background-color: #b02a2c; /* Darker shade */
}

/* Messages */
.mep-form-messages .mep-message { /* More specific for form messages */
    margin-top: 15px;
}
.mep-message {
    padding: 12px 18px; /* Adjusted padding */
    margin-bottom: 20px; /* Consistent margin */
    border-radius: 4px;
    border-left-width: 5px; /* Thicker left border */
    border-left-style: solid;
    font-size: 0.95em;
}

.mep-message-success {
    background-color: #d4edda; /* Bootstrap success colors */
    border-color: #28a745;
    color: #155724;
}

.mep-message-error {
    background-color: #f8d7da; /* Bootstrap error colors */
    border-color: #dc3545;
    color: #721c24;
}

.mep-message-info {
    background-color: #d1ecf1; /* Bootstrap info colors */
    border-color: #007bff;
    color: #0c5460;
}

/* User dashboard */
.mep-user-dashboard-wrapper .mep-details-table { /* More specific */
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.mep-user-dashboard-wrapper .mep-details-table th,
.mep-user-dashboard-wrapper .mep-details-table td {
    padding: 12px; /* Increased padding */
    border-bottom: 1px solid #e5e5e5; /* Lighter border */
    text-align: left;
    vertical-align: top; /* Better for multi-line content */
}

.mep-user-dashboard-wrapper .mep-details-table th {
    width: 30%;
    font-weight: 600;
    background-color: #f9f9f9; /* Slight background for headers */
}

.mep-text-danger {
    color: #dc3545; /* Bootstrap danger color */
}

.mep-dashboard-navigation.mep-nav-top {
    margin-bottom: 20px;
}
.mep-dashboard-navigation.mep-nav-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.mep-payment-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85em; /* Slightly smaller */
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

.mep-status-pending {
    background-color: #fff3cd; /* Bootstrap warning colors */
    color: #856404;
    border: 1px solid #ffeeba;
}

.mep-status-awaiting_transfer {
    background-color: #d1ecf1; /* Bootstrap info colors */
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.mep-status-completed {
    background-color: #d4edda; /* Bootstrap success colors */
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mep-status-failed,
.mep-status-cancelled { /* Grouped similar visual */
    background-color: #f8d7da; /* Bootstrap error colors */
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mep-status-refunded {
    background-color: #e2e3e5; /* Bootstrap secondary/muted colors */
    color: #383d41;
    border: 1px solid #d6d8db;
}


.mep-payment-instructions {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}
.mep-payment-instructions h4 { margin-top: 0; }


.mep-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.mep-hidden {
    display: none !important; /* Stronger rule for hidden */
}

/* Payment method styles (already partially covered, can be merged or refined) */
/* .mep-payment-method-header - covered by .mep-payment-method label/radio alignment */
/* .mep-payment-icons - if you add icons */

/* User dashboard payment info (e.g., retry payment button area) */
.mep-payment-retry, /* Used in user-dashboard.php for retry block */
.mep-payment-info { /* Used in user-dashboard.php */
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mep-payment-retry h4,
.mep-payment-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0073aa;
}

.mep-payment-actions { /* Already styled above, for dashboard edit/cancel buttons */
    /* margin-top: 15px; */ /* Can be redundant if .mep-actions is used consistently */
}

.mep-payment-button { /* This seems like a duplicate of .mep-button or .mep-button-primary */
    /* display: inline-block;
    padding: 10px 15px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease; */
}
/* .mep-payment-button:hover { background-color: #005f8b; color: #fff; } */


/* Price calculation styles */
.mep-price-calculation {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.mep-price-input { /* Generalizing style for number inputs in price calc */
    display: inline-block;
    width: clamp(70px, 15vw, 100px); /* Responsive width */
    text-align: center; /* Center numbers */
    font-size: 1.1em; /* Slightly smaller than total price display */
    padding: 8px;
    margin-right: 10px; /* Space before total price */
    vertical-align: middle;
}

.mep-total-price {
    display: inline-block;
    font-size: 1.1em;
    padding: 8px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px; /* For when it wraps */
    vertical-align: middle;
}

.mep-total-price strong {
    margin-right: 5px;
    font-weight: 600;
}

#mep-total-amount {
    font-weight: bold;
    font-size: 1.2em;
    color: #0073aa;
}

/* Spinner Styles (centralized here) */
.mep-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(181, 147, 101, 0.8); /* Adjusted background color */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Higher z-index */
}

.mep-spinner-overlay.mep-spinner-active {
    display: flex !important; /* Ensure it shows when active */
}

.mep-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 30px 40px; /* More padding */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: mep-pulse 1.8s infinite ease-in-out alternate; /* Smoother pulse */
}

.mep-spinner {
    width: 70px; /* Slightly smaller */
    height: 70px;
    position: relative;
}

.mep-spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid transparent; /* Slightly thinner border */
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: mep-spinner-rotate 1.4s linear infinite; /* Adjusted timing */
}

.mep-spinner-circle:nth-child(2) {
    border-top-color: #00a0d2;
    animation-delay: -0.7s; /* Offset animation */
}

.mep-spinner-circle:nth-child(3) {
    /* Removed third circle for cleaner look, can be added back if preferred */
    display:none;
}

.mep-spinner-text {
    margin-top: 20px;
    font-size: 1.1em; /* Larger text */
    color: #333;
    font-weight: 500;
}

@keyframes mep-spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes mep-pulse {
    0% {
        transform: scale(0.98);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.02);
        opacity: 1;
    }
}


/* Responsive layout */
@media screen and (max-width: 768px) { /* Adjusted breakpoint */
    .mep-form-wrapper,
    .mep-user-dashboard-wrapper {
        margin: 10px; /* Less margin on small screens */
        padding: 15px;
    }

    .mep-price-calculation {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Align items to start */
    }

    .mep-price-input {
        width: 100%; /* Full width for easier touch */
        margin-bottom: 10px;
        margin-right: 0;
    }

    .mep-total-price {
        align-self: flex-start; /* Keep it aligned left */
        width: auto; /* Adjust width as needed */
    }

    .mep-user-dashboard-wrapper .mep-details-table thead {
        display: none; /* Hide table head on small screens, use data-label */
    }
    .mep-user-dashboard-wrapper .mep-details-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e5e5e5;
        border-radius: 3px;
    }
    .mep-user-dashboard-wrapper .mep-details-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: right; /* Align content to right */
        padding-left: 50%; /* Make space for label */
        position: relative;
        border-bottom: 1px dotted #eee; /* Lighter border between td's */
    }
    .mep-user-dashboard-wrapper .mep-details-table td:last-child {
        border-bottom: none;
    }

    .mep-user-dashboard-wrapper .mep-details-table td::before {
        content: attr(data-label); /* Use data-label for pseudo-header */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px); /* Adjust width */
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }


    .mep-actions {
        flex-direction: column;
    }
    .mep-actions .mep-button {
        width: 100%;
        text-align: center;
    }

    /* Spinner visibility on mobile - Re-evaluate based on UX preference */
    /* Current setting from previous file: .mep-spinner-overlay { display: none !important; } */
    /* If you want spinner on mobile, remove or adjust the display:none !important for .mep-spinner-overlay in this media query */
}

/* Dashboard specific styles */
.mep-dashboard-navigation {
    margin-bottom: 20px;
}
.mep-dashboard-overview .mep-overview-table td .mep-button {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Card styling for dashboard sections */
.mep-user-dashboard-wrapper .card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
.mep-user-dashboard-wrapper .card h3,
.mep-user-dashboard-wrapper .card h4 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}