/**
 * JMS Plugin - Rental Management Styles
 * Styles for the tenant rental interface
 */

/* Rental List Styles */
.jms-tenant-rentals {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.jms-rentals-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.jms-rental-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.rental-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.rental-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.rental-status {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-active {
    background-color: #e6f7ee;
    color: #1f9d55;
}

.status-pending_approval {
    background-color: #fff8e6;
    color: #d48806;
}

.status-ended,
.status-terminated {
    background-color: #fef3f2;
    color: #f04438;
}

.rental-details {
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.detail-label {
    font-weight: 500;
    color: #666;
}

.detail-value {
    color: #333;
}

.rental-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.rental-actions .button {
    flex: 1;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.rental-actions .button-primary {
    background-color: #1e88e5;
    border-color: #1e88e5;
}

.rental-actions .button-primary:hover {
    background-color: #1976d2;
    border-color: #1976d2;
}

/* Rental Details Styles */
.jms-rental-details {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.jms-rental-header {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jms-rental-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8em;
}

.jms-rental-content {
    padding: 30px;
}

.jms-rental-section {
    margin-bottom: 30px;
}

.jms-rental-section:last-child {
    margin-bottom: 0;
}

.jms-rental-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 1.4em;
}

.jms-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.jms-rental-costs {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.jms-rental-costs th,
.jms-rental-costs td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.jms-rental-costs th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #555;
}

.jms-rental-costs tr:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right;
}

.jms-special-conditions {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #1e88e5;
}

.jms-rental-actions {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.jms-rental-actions .button-primary {
    padding: 12px 24px;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 10px;
}

.jms-rental-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: right;
    background: #f8f9fa;
}

/* Alerts and Notices */
.jms-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.jms-alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.jms-alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.jms-alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Status Badge Styles for WP_List_Table */
.jms-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}

.jms-status-badge.status-active {
    background-color: #e6f7ee;
    color: #1f9d55;
    border: 1px solid #c3e6cb;
}

.jms-status-badge.status-pending {
    background-color: #fff8e6;
    color: #d48806;
    border: 1px solid #ffeaa7;
}

.jms-status-badge.status-ended,
.jms-status-badge.status-terminated {
    background-color: #fef3f2;
    color: #f04438;
    border: 1px solid #f5c6cb;
}

.jms-status-badge.status-other {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Table Action Buttons */
.wp-list-table .button-small {
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.4;
    margin-right: 5px;
}

.wp-list-table .button-link-delete {
    color: #a00;
    border-color: #a00;
}

.wp-list-table .button-link-delete:hover {
    background-color: #a00;
    color: #fff;
}

/* Table Styling Improvements */
.wp-list-table th,
.wp-list-table td {
    vertical-align: middle;
}

.wp-list-table .column-monthly_rent {
    text-align: right;
    font-weight: 500;
}

.wp-list-table .column-actions {
    white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .jms-rentals-list,
    .jms-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .jms-rental-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .jms-rental-content {
        padding: 20px;
    }
    
    .rental-actions {
        flex-direction: column;
    }
    
    .rental-actions .button {
        width: 100%;
    }
}
