/**
 * Trade-In Frontend Styles
 *
 * @package ReownTradeIn
 */

/* Trade-in button on product page */
.trade-in-button-wrapper {
    margin-top: 15px;
}

.trade-in-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background-color: #2c3e50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.trade-in-button:hover {
    background-color: #34495e;
    color: #fff;
}

.trade-in-button:active {
    transform: scale(0.98);
}

.trade-in-button svg {
    width: 18px;
    height: 18px;
}

/* Trade-in badge on product cards */
.trade-in-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background-color: #27ae60;
    border-radius: 3px;
    z-index: 1;
}

/* My Account - Trade-in requests list */
.woocommerce-trade-in-requests {
    margin-top: 20px;
}

.trade-in-request-card {
    display: block;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.trade-in-request-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.trade-in-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.trade-in-request-id {
    font-weight: 600;
    color: #333;
}

.trade-in-request-status {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.trade-in-request-status.pending {
    background: #fff3cd;
    color: #856404;
}

.trade-in-request-status.reviewing {
    background: #cce5ff;
    color: #004085;
}

.trade-in-request-status.accepted {
    background: #d4edda;
    color: #155724;
}

.trade-in-request-status.denied {
    background: #f8d7da;
    color: #721c24;
}

.trade-in-request-status.countered {
    background: #e2d5f1;
    color: #6f42c1;
}

.trade-in-request-status.completed {
    background: #d4edda;
    color: #155724;
}

.trade-in-request-status.cancelled {
    background: #e9ecef;
    color: #6c757d;
}

.trade-in-request-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.trade-in-request-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Empty state */
.trade-in-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.trade-in-empty-state svg {
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.trade-in-empty-state h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #333;
}

.trade-in-empty-state p {
    margin: 0;
    color: #666;
}

/* Trade-in modal/form (basic styles) */
.trade-in-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.trade-in-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-in-modal-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    margin: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.trade-in-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.trade-in-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.trade-in-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.trade-in-modal-close:hover {
    background: #e5e5e5;
}

.trade-in-modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.trade-in-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
}

/* Counter offer response */
.trade-in-counter-offer {
    padding: 20px;
    margin: 20px 0;
    background: #f0f4ff;
    border: 1px solid #b3c7ff;
    border-radius: 8px;
}

.trade-in-counter-offer h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.trade-in-counter-offer .counter-value {
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
}

.trade-in-counter-offer .counter-expiry {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.trade-in-counter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.trade-in-counter-actions button {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.trade-in-counter-actions .accept-button {
    background: #22c55e;
    color: #fff;
}

.trade-in-counter-actions .accept-button:hover {
    background: #16a34a;
}

.trade-in-counter-actions .decline-button {
    background: #ef4444;
    color: #fff;
}

.trade-in-counter-actions .decline-button:hover {
    background: #dc2626;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .trade-in-modal-content {
        margin: 10px;
        max-height: 95vh;
        border-radius: 8px;
    }

    .trade-in-request-meta {
        flex-direction: column;
        gap: 8px;
    }

    .trade-in-counter-actions {
        flex-direction: column;
    }
}
