/* Movie Rental System - Public Styles */

.movie-rental-store {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.movie-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.movie-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.movie-card h3 {
    padding: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.movie-card .price {
    padding: 0 10px;
    font-weight: bold;
    color: #0073aa;
    font-size: 18px;
    display: block;
}

.movie-card .view-details {
    width: calc(100% - 20px);
    margin: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
}

.modal.active {
    display: block;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: #000;
}

.movie-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.movie-info h2 {
    margin-top: 0;
}

.movie-info p {
    color: #666;
    line-height: 1.6;
}

.movie-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    font-size: 14px;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item::before {
    content: "•";
    margin-right: 8px;
}

.meta-item:first-child::before {
    display: none;
}

.purchase-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.price-display .price {
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
}

.price-display .duration {
    color: #666;
    font-size: 14px;
}

.coupon-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 15px;
}

.coupon-input input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.discount-info {
    background: #e8f5e9;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.discount-info p {
    margin: 5px 0;
    color: #2e7d32;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #0073aa;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* Pagination */
.movies-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.pagination-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.pagination-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Player Container */
.movie-player-container {
    width: 100%;
    margin: 20px 0;
}

#video-player {
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.player-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
}

.player-info h2 {
    margin: 0 0 10px 0;
}

.player-info p {
    margin: 5px 0;
    color: #666;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="text"],
#card-element {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

#card-element {
    padding: 12px;
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .movie-details {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .price-display {
        flex-direction: column;
        gap: 10px;
    }

    .coupon-input {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Customer Dashboard Styles
   ============================================ */

.mrs-customer-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

.mrs-dashboard-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.mrs-dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: bold;
}

.mrs-dashboard-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Stats Grid */
.mrs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mrs-stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.mrs-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.mrs-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Dashboard Sections */
.mrs-dashboard-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mrs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.mrs-section-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

/* Buttons */
.mrs-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.mrs-btn-primary {
    background: #0073aa;
    color: white;
}

.mrs-btn-primary:hover {
    background: #005a87;
}

.mrs-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.mrs-btn-secondary:hover {
    background: #e8e8e8;
}

.mrs-btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

/* Rentals Grid */
.mrs-rentals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.mrs-rental-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.mrs-rental-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mrs-rental-image {
    width: 100%;
    height: 200px;
    background: #ddd;
    overflow: hidden;
}

.mrs-rental-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mrs-rental-info {
    padding: 15px;
}

.mrs-rental-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.mrs-rental-price {
    color: #0073aa;
    font-weight: bold;
    margin: 5px 0;
}

.mrs-rental-expires {
    color: #666;
    font-size: 14px;
    margin: 5px 0 15px 0;
}

.mrs-rental-actions {
    display: flex;
    gap: 10px;
}

.mrs-rental-actions .mrs-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
}

/* Tables */
.mrs-access-codes-table,
.mrs-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.mrs-access-codes-table thead,
.mrs-history-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.mrs-access-codes-table th,
.mrs-history-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.mrs-access-codes-table td,
.mrs-history-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.mrs-access-codes-table tbody tr:hover,
.mrs-history-table tbody tr:hover {
    background: #f9f9f9;
}

code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
}

/* Badges */
.mrs-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mrs-badge-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.mrs-badge-used {
    background: #f5f5f5;
    color: #666;
}

.mrs-badge-expired {
    background: #ffebee;
    color: #c62828;
}

.mrs-status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.mrs-status-pending {
    background: #fff3e0;
    color: #e65100;
}

.mrs-status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.mrs-status-expired {
    background: #f5f5f5;
    color: #666;
}

/* Forms */
.mrs-account-form {
    max-width: 500px;
}

.mrs-form-group {
    margin-bottom: 15px;
}

.mrs-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.mrs-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.mrs-form-group input:disabled {
    background: #f5f5f5;
    color: #666;
}

/* Messages */
.mrs-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.mrs-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.mrs-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.mrs-no-rentals {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .mrs-customer-dashboard {
        padding: 10px;
    }

    .mrs-dashboard-header {
        padding: 25px 15px;
    }

    .mrs-dashboard-header h1 {
        font-size: 24px;
    }

    .mrs-stats-grid {
        grid-template-columns: 1fr;
    }

    .mrs-dashboard-section {
        padding: 20px;
    }

    .mrs-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mrs-section-header .mrs-btn {
        width: 100%;
    }

    .mrs-rentals-grid {
        grid-template-columns: 1fr;
    }

    .mrs-access-codes-table,
    .mrs-history-table {
        font-size: 13px;
    }

    .mrs-access-codes-table th,
    .mrs-history-table th,
    .mrs-access-codes-table td,
    .mrs-history-table td {
        padding: 8px;
    }

    .mrs-rental-actions {
        flex-wrap: wrap;
    }

    .mrs-rental-actions .mrs-btn {
        flex: 0 1 48%;
    }
}