/* public/app/css/my-tickets-styles.css */

/* Overlay for My Tickets Modal */
.my-tickets-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Same as carton-editor-overlay */
    opacity: 1; /* Always visible when active */
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(5px);
}

/* Inner Container for My Tickets Modal */
.my-tickets-container-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* Gradient background */
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    font-family: 'Poppins', sans-serif;
}

/* Header for My Tickets Modal */
.my-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.my-tickets-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #fff; /* Ensure header text is white */
}

/* Body for My Tickets Modal */
.my-tickets-body {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Spacing between elements */
    overflow-y: auto;
}

/* Footer for My Tickets Modal */
.my-tickets-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start; /* Changed from flex-end to flex-start */
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.my-tickets-footer .secondary-button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    background-color: #7f8c8d;
    color: white;
}

.my-tickets-footer .secondary-button:hover {
    background-color: #95a5a6;
    transform: scale(1.05);
}

/* Existing styles for next-draw-date, tickets-container, ticket-card, etc. will be adjusted if needed */
.next-draw-date {
    font-size: 0.9em;
    color: #ccc; /* Lighter color for dark background */
    text-align: center;
    margin-bottom: 15px;
}

.tickets-container {
    max-height: 70vh; /* Keep existing max-height */
    overflow-y: auto;
    padding-right: 10px;
    width: 100%; /* Ensure it takes full width */
}

.ticket-card {
    border: 2px solid rgba(0, 191, 255, 0.5); /* Increased width and brighter blue border */
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    background: #1e3c72; /* Dark blue background for ticket card */
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Adjusted shadow */
    transition: all 0.3s ease;
}

.ticket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4); /* Stronger shadow on hover */
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1em;
    color: #fff;
}

.ticket-actions { /* Add this new rule to center the button */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center;
    flex-grow: 1; /* Allow it to take available space */
    gap: 10px; /* Space between elements if there are more */
}

.ticket-serial {
    font-weight: bold;
    color: #333; /* Darker text for contrast on blue */
    background-color: #00bfff; /* Deep Sky Blue */
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.estado-pendiente {
    color: #333; /* Darker text for contrast on light blue */
    background-color: #87ceeb; /* Sky Blue */
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.estado-verificado {
    color: #fff;
    background-color: #28a745; /* Keep green for verified, it's a standard status color */
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.estado-rechazado {
    color: #fff;
    background-color: #dc3545; /* Keep red for rejected, it's a standard status color */
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.ticket-card.estado-rechazado {
    background: rgba(220, 53, 69, 0.2); /* Reddish transparent background */
    border-color: rgba(220, 53, 69, 0.5);
    opacity: 0.9;
}

/* Specific background for verified ticket cards */
.ticket-card.estado-verificado {
    background: #1e3c72; /* Ensure verified cards also have the dark blue background */
}

.fichas-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ficha {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background-color: #1e3c72; /* A darker blue from the gradient for the ficha background */
    border: 3px solid #00bfff; /* Deep Sky Blue */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.ficha:hover {
    transform: scale(1.1);
}

.ficha img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}

/* Scrollbar Styles for dark background */
.tickets-container::-webkit-scrollbar {
    width: 8px;
}

.tickets-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1); /* Lighter track */
    border-radius: 10px;
}

.tickets-container::-webkit-scrollbar-thumb {
    background-color: #00bfff; /* Deep Sky Blue */
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Styles */
@media (max-width: 600px) {
    .my-tickets-container-inner {
        border-radius: 0;
    }

    .my-tickets-body {
        padding: 15px;
        gap: 10px;
    }

    .tickets-container {
        max-height: calc(100vh - 180px); /* Adjusted for header/footer */
    }

    .ticket-serial {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}

/* Desktop Styles for larger screens */
@media (min-width: 768px) {
    .my-tickets-body {
        align-items: center; /* Center content horizontally */
    }

    .tickets-container {
        max-width: 800px; /* Limit the maximum width of the tickets container */
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid for cards */
        gap: 20px; /* Space between cards */
        padding-right: 0; /* Remove padding-right for scrollbar if grid handles overflow */
    }

    .ticket-card {
        margin-bottom: 0; /* Remove bottom margin as gap handles spacing */
    }

    .my-tickets-container-inner {
        max-width: 900px; /* Limit the overall modal width on large screens */
        max-height: 90vh; /* Limit the overall modal height on large screens */
        border-radius: 15px; /* Add border-radius for desktop modal */
    }
}

/* Style for the new Edit button */
.edit-carton-btn.button-style {
    background-color: #6c757d; /* Gray tone */
    color: #fff; /* White text for contrast */
    border: none;
    border-radius: 15px;
    padding: 5px 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.9em; /* Slightly smaller font */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.edit-carton-btn.button-style:hover {
    background-color: #5a6268; /* Darker gray on hover */
    transform: translateY(-1px);
}

.edit-carton-btn.button-style:disabled {
    background-color: #495057; /* Darker gray for disabled state */
    color: #adb5bd; /* Lighter text for disabled state */
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}