/* WP Rentals Promotions Plugin Styles */

.wp-rentals-coupon-section {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e1e1e1;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.coupon-input-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    height: auto;
    max-width: none;
}

.coupon-input-group input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.coupon-input-group button {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.coupon-input-group button:hover {
    background: #005a87;
}

.coupon-input-group button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.coupon-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.coupon-message.coupon-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.coupon-message.coupon-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.discount-display {
    background: #d4edda;
    color: #155724;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.discount-label {
    font-weight: 500;
}

.discount-amount {
    font-weight: bold;
    color: #28a745;
}

.remove-coupon {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    padding: 0 5px;
    line-height: 1;
}

.remove-coupon:hover {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .coupon-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .coupon-input-group input[type="text"] {
        width: 100%;
    }

    .coupon-input-group button {
        width: 100%;
    }

    .discount-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Integration with common WP Rentals form styles */
.booking_form .wp-rentals-coupon-section,
.wpestate_booking_form .wp-rentals-coupon-section {
    margin: 20px 0;
}

/* Admin styles */
.wp-admin .wp-rentals-promotions-table {
    margin-top: 20px;
}

.wp-admin .coupon-stats {
    background: #f1f1f1;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.wp-admin .coupon-stats h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.wp-admin .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.wp-admin .stat-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    text-align: center;
}

.wp-admin .stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
    display: block;
}

.wp-admin .stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-rentals-coupon-section {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }

    .coupon-input-group input[type="text"] {
        background: #3c3c3c;
        border-color: #555;
        color: #fff;
    }

    .coupon-input-group input[type="text"]:focus {
        border-color: #007cba;
    }
}