/* PropDB2 Checkout Styles */

a.ii_button,
button.ii_button,
.ii_button {
	font-weight: 600;
	border: 1px solid #444;
	padding-left: 6px !important;
	padding-right: 6px !important;
	padding-top: clamp(1rem, 1.2rem, 2rem) !important;
	padding-bottom: clamp(1rem, 1.2rem, 2rem) !important;
	margin: 10px 1px 1px 1px;
	text-align: right;
	clear: both;
	text-decoration: none !important;
	background-color: #888;
	color: white;
	border-radius: 6px;
	box-shadow: 1px 1px 4px rgba(44, 44, 44, 0.5);
	display: inline-block;
}

a.ii_button:hover,
button.ii_button:hover,
.ii_button:hover {
	font-weight: 600;
	border: 1px solid #444;
	margin: 11px 2px 0 0;
	text-align: right;
	text-decoration: none !important;
	background-color: #aaa;
	color: white;
	border-radius: 6px;
	box-shadow: 1px 1px 3px rgba(24, 24, 24, 0.6);
}

/* Cart Container */
#propdb-cart-container {
    position: fixed;
    right: -250px;
    top: 5vh;
    width: 250px;
    background-color: #f9f9f9;
    border-left: 1px solid #ccc;
    z-index: 9999;
    transition: right 0.3s ease;
}

#propdb-cart-container.open {
    right: 0;
}

#propdb-cart-tab {
    position: absolute;
    right: -20px;
    top: 84px;
    background: #ffffee;
    padding: 4px 8px 4px 8px;
    padding-bottom: 4px;
    border: 1px solid rgba(128, 128, 128, 0.5);
    box-shadow: -4px 0px 4px rgba(128, 128, 128, 0.25);
    border-radius: 6px 6px 0 0;
    transform: rotate(-90deg);
    transform-origin: top left;    
    cursor: pointer;
}

#propdb-cart-content {
    padding: 10px;
    z-index: 30;
    min-height: 84px;
    max-height: 400px;
    overflow-y: auto;
}

#propdb-cart-content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#propdb-cart-content li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

#propdb-cart-content li a {
    flex-grow: 1;
}

/* Remove from cart button */
.propdb-remove-from-cart-button {
    background-color: red;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 50%;
    margin-left: 5px;
}

/* Checkout link */
.propdb-checkout-link {
    display: block;
    margin-top: 10px;
    text-align: center;
    background-color: #0073aa;
    color: #fff !important;
    padding: 5px;
    text-decoration: none;
    border-radius: 4px;
}

.propdb-checkout-link:hover {
    background-color: #005177;
}

/* Checkout Form */
#propdb-checkout-form .form-row {
    margin-bottom: 15px;
}

#propdb-checkout-form label {
    display: inline-block;
    width: 12.5vw;
    min-width: 180px;
    vertical-align: top;
}

#propdb-checkout-form input[type="text"],
#propdb-checkout-form input[type="email"],
#propdb-checkout-form textarea {
    width: 20vw;
    min-width: 240px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#propdb-checkout-form textarea {
    min-height: 100px;
}

.checkout-terms {
    margin-top: 20px;
}

.checkout-terms input[type="checkbox"] {
    margin-right: 10px;
}

/* Checkout Result */
#propdb-checkout-result {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}

#propdb-checkout-result p {
    margin: 0;
}

#propdb-checkout-result.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

#propdb-checkout-result.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Add to Cart Button */
.propdb-add-to-cart-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #2271b1;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    border: none;
}

.propdb-add-to-cart-button:hover {
    background-color: #135e96;
}

/* User Rentals Table */
.propdb-rentals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.propdb-rentals-table th,
.propdb-rentals-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.propdb-rentals-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.rental-items-list {
    margin: 5px 0 0 15px;
    padding: 0;
    font-size: 0.9em;
}

/* Status Styles */
.status-pending {
    color: #856404;
    background-color: #fff3cd;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.status-approved {
    color: #0c5460;
    background-color: #d1ecf1;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.status-checked-out {
    color: #155724;
    background-color: #d4edda;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.status-returned {
    color: #004085;
    background-color: #cce5ff;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.status-cancelled {
    color: #721c24;
    background-color: #f8d7da;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

.status-overdue {
    color: #ffffff;
    background-color: #dc3545;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    #propdb-checkout-form label {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
    
    #propdb-checkout-form input[type="text"],
    #propdb-checkout-form input[type="email"],
    #propdb-checkout-form textarea {
        width: 100%;
    }
    
    .propdb-rentals-table {
        display: block;
        overflow-x: auto;
    }
}
