/**
 * Public styles for MN-Pinjalat
 */

/* General Styles */
.mn-pinjalat-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    color: #2c3338;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.button:hover {
    background: #e9e9ea;
    border-color: #8c8f94;
    color: #1d2327;
}

.button.primary-button {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.button.primary-button:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Alat List Styles */
.mn-pinjalat-alat-list {
    margin: 20px 0;
}

.mn-pinjalat-filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.alat-filters-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.search-field,
.category-filter {
    flex: 1;
    min-width: 200px;
}

.search-field label,
.category-filter label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.search-field input,
.category-filter select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.filter-button {
    padding: 10px 20px;
    white-space: nowrap;
}

/* Alat Grid */
.alat-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.alat-grid.columns-1 { grid-template-columns: 1fr; }
.alat-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.alat-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.alat-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .alat-grid.columns-2,
    .alat-grid.columns-3,
    .alat-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .alat-grid.columns-3,
    .alat-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Alat Item */
.alat-item {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.alat-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.alat-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.alat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.alat-item:hover .alat-image img {
    transform: scale(1.05);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f0f0f1;
    color: #646970;
    font-size: 14px;
}

.alat-content {
    padding: 20px;
}

.alat-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.alat-title a {
    color: #2c3338;
    text-decoration: none;
}

.alat-title a:hover {
    color: #2271b1;
}

.alat-meta {
    margin-bottom: 15px;
}

.alat-meta p {
    margin: 5px 0;
    font-size: 14px;
    color: #646970;
}

.alat-excerpt {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #50575e;
}

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

.alat-actions .button {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 12px;
}

/* Pagination */
.alat-pagination {
    text-align: center;
    margin-top: 30px;
}

.alat-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    color: #2c3338;
    text-decoration: none;
    border-radius: 3px;
}

.alat-pagination .page-numbers:hover,
.alat-pagination .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* Modal Styles */
.mn-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mn-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.mn-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.mn-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.mn-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mn-modal-close:hover {
    color: #2c3338;
}

.mn-modal-body {
    padding: 20px;
}

/* Booking Form */
.booking-info-section,
.booking-form-section,
.booking-terms-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f1;
}

.booking-info-section:last-child,
.booking-form-section:last-child,
.booking-terms-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.booking-info-section h4,
.booking-form-section h4,
.booking-terms-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3338;
}

.alat-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alat-info .alat-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.alat-info .alat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.alat-details h5 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.alat-details p {
    margin: 4px 0;
    font-size: 14px;
    color: #646970;
}

.member-info p {
    margin: 8px 0;
    font-size: 14px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3338;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.form-row small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #646970;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

.rules-content {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
}

/* Member Dashboard */
.mn-pinjalat-member-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-nav {
    display: flex;
    border-bottom: 1px solid #c3c4c7;
    margin-bottom: 30px;
}

.nav-tab {
    padding: 12px 20px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-bottom: none;
    color: #2c3338;
    text-decoration: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    background: #e9e9ea;
    color: #1d2327;
}

.nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    color: #2271b1;
}

.dashboard-content {
    background: #fff;
    padding: 30px;
    border: 1px solid #c3c4c7;
    border-radius: 0 4px 4px 4px;
}

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

.stat-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e1e1;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #646970;
    font-weight: 600;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3338;
}

.stat-number.pending {
    color: #d63638;
}

.stat-number.approved {
    color: #00a32a;
}

/* Calendar */
.dashboard-calendar {
    margin-bottom: 30px;
}

.dashboard-calendar h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#member-calendar {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

/* Tables */
.bookings-table,
.images-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.bookings-table th,
.bookings-table td,
.images-table th,
.images-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.bookings-table th,
.images-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #2c3338;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff2e5;
    color: #d63638;
}

.status-approved {
    background: #e7f5e7;
    color: #00a32a;
}

.status-rejected {
    background: #f0f0f1;
    color: #646970;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.image-item {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-info {
    padding: 15px;
}

.image-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.image-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #646970;
    line-height: 1.4;
}

.image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.image-meta .year {
    font-size: 12px;
    color: #646970;
}

.image-meta .status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Registration Form */
.mn-pinjalat-registration-form {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
}

.mn-pinjalat-registration-form h3 {
    margin: 0 0 25px 0;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #2c3338;
}

.terms-conditions {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.terms-conditions h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.registration-messages {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.registration-messages.success {
    background: #e7f5e7;
    color: #00a32a;
    border: 1px solid #00a32a;
}

.registration-messages.error {
    background: #ffeaea;
    color: #d63638;
    border: 1px solid #d63638;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: #646970;
}

.error {
    background: #ffeaea;
    color: #d63638;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #d63638;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mn-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .alat-filters-form {
        flex-direction: column;
    }
    
    .search-field,
    .category-filter {
        min-width: auto;
    }
    
    .dashboard-nav {
        flex-wrap: wrap;
    }
    
    .nav-tab {
        margin-bottom: 5px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .alat-info {
        flex-direction: column;
        text-align: center;
    }
    
    .alat-info .alat-image {
        align-self: center;
    }
}
