/**
 * JoyPetTime Frontend Styles
 *
 * @package JoyPetTime Core
 */

/* ============================================
   Points Balance Display Widget
   ============================================ */

.jpt-points-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.jpt-points-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.jpt-points-widget .jpt-points-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.jpt-points-widget .jpt-points-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.jpt-points-widget .jpt-points-actions {
    margin-top: 15px;
}

.jpt-points-widget .jpt-points-actions a {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
    margin-right: 8px;
    transition: background 0.2s;
}

.jpt-points-widget .jpt-points-actions a:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Points history table */
.jpt-points-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.jpt-points-history th,
.jpt-points-history td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.jpt-points-history th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.jpt-points-history .jpt-earn {
    color: #46b450;
    font-weight: 600;
}

.jpt-points-history .jpt-spend,
.jpt-points-history .jpt-redeem,
.jpt-points-history .jpt-expire {
    color: #dc3232;
    font-weight: 600;
}

/* Points redemption calculator */
.jpt-redeem-calculator {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.jpt-redeem-calculator h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #333;
}

.jpt-redeem-calculator .jpt-redeem-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.jpt-redeem-calculator input[type="number"] {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.jpt-redeem-calculator .jpt-redeem-value {
    font-size: 14px;
    color: #666;
}

.jpt-redeem-calculator .jpt-redeem-btn {
    background: #e2401c;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.jpt-redeem-calculator .jpt-redeem-btn:hover {
    background: #c7331a;
}

/* ============================================
   Tier Badge Styles
   ============================================ */

.jpt-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpt-tier-badge.tier-bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #fff;
}

.jpt-tier-badge.tier-silver {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #333;
}

.jpt-tier-badge.tier-gold {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #333;
}

.jpt-tier-badge.tier-platinum {
    background: linear-gradient(135deg, #e5e4e2, #b8b8b8);
    color: #333;
}

/* Membership tier section */
.jpt-membership-section {
    margin-bottom: 30px;
}

.jpt-membership-section .jpt-tier-card-display {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
}

.jpt-tier-card-display .jpt-tier-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.jpt-tier-card-display .jpt-tier-progress {
    margin: 15px 0;
}

.jpt-tier-card-display .jpt-progress-bar {
    background: #eee;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    position: relative;
}

.jpt-tier-card-display .jpt-progress-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
}

.jpt-tier-card-display .jpt-progress-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.jpt-tier-benefits {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.jpt-tier-benefits li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    position: relative;
    padding-left: 24px;
}

.jpt-tier-benefits li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #46b450;
    font-weight: bold;
}

/* ============================================
   Balance Payment at Checkout
   ============================================ */

.jpt-balance-payment-fields {
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
}

.jpt-balance-info {
    font-size: 14px;
    margin-bottom: 10px;
}

.jpt-balance-sufficient {
    color: #46b450;
    font-size: 14px;
}

.jpt-balance-insufficient {
    color: #ffb900;
    font-size: 14px;
}

.jpt-balance-zero {
    color: #dc3232;
    font-size: 14px;
}

.jpt-use-balance-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

/* Balance section */
.jpt-balance-section {
    margin-bottom: 30px;
}

.jpt-balance-display {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.jpt-balance-display .jpt-balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.jpt-balance-display .jpt-balance-value {
    font-size: 32px;
    font-weight: 700;
}

/* Recharge buttons */
.jpt-recharge-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.jpt-recharge-buttons .jpt-recharge-btn {
    background: #fff;
    color: #333;
    border: 2px solid #11998e;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.jpt-recharge-buttons .jpt-recharge-btn:hover,
.jpt-recharge-buttons .jpt-recharge-btn.active {
    background: #11998e;
    color: #fff;
}

/* ============================================
   Review Enhancements
   ============================================ */

.jpt-review-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.comment-form-review-title {
    margin-bottom: 15px;
}

.comment-form-review-title label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.comment-form-review-title input {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Merchant reply */
.jpt-merchant-reply {
    background: #f0f7ff;
    border: 1px solid #c3dafe;
    border-left: 4px solid #4a90d9;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.jpt-merchant-reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.jpt-merchant-badge {
    background: #4a90d9;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.jpt-reply-date {
    font-size: 12px;
    color: #888;
}

.jpt-merchant-reply-body {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* ============================================
   FAQ Accordion Styles
   ============================================ */

.jpt-faq-accordion {
    margin: 20px 0;
}

.jpt-faq-item {
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.jpt-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
    transition: background 0.2s;
}

.jpt-faq-question:hover {
    background: #eef0f2;
}

.jpt-faq-question[aria-expanded="true"] {
    background: #eef0f2;
}

.jpt-faq-question-text {
    flex: 1;
    margin-right: 10px;
}

.jpt-faq-icon {
    font-size: 20px;
    font-weight: 300;
    color: #666;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.jpt-faq-question[aria-expanded="true"] .jpt-faq-icon {
    transform: rotate(45deg);
}

.jpt-faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.jpt-faq-answer.jpt-faq-open {
    max-height: 500px;
    padding: 15px 20px;
}

.jpt-faq-answer-content {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.jpt-breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 13px;
}

.jpt-breadcrumbs-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 0;
}

.jpt-breadcrumb-item {
    display: inline;
}

.jpt-breadcrumb-item a {
    color: #4a90d9;
    text-decoration: none;
}

.jpt-breadcrumb-item a:hover {
    text-decoration: underline;
}

.jpt-breadcrumb-current {
    color: #666;
    font-weight: 500;
}

.jpt-breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* ============================================
   Subscription Section
   ============================================ */

.jpt-subscriptions-section {
    margin-bottom: 30px;
}

.jpt-subscription-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jpt-subscription-card .jpt-sub-info {
    flex: 1;
}

.jpt-subscription-card .jpt-sub-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.jpt-subscription-card .jpt-sub-meta {
    font-size: 13px;
    color: #666;
}

.jpt-subscription-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.jpt-subscription-status.status-active {
    background: #e6f4ea;
    color: #46b450;
}

.jpt-subscription-status.status-cancelled {
    background: #fce8e6;
    color: #dc3232;
}

.jpt-subscription-status.status-expired {
    background: #fef7e0;
    color: #ffb900;
}

/* Email preferences */
.jpt-email-preferences {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.jpt-email-preferences h4 {
    margin: 0 0 15px;
    font-size: 16px;
}

.jpt-email-pref-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.jpt-email-pref-item label {
    font-size: 14px;
    cursor: pointer;
}

/* ============================================
   Responsive
   ============================================ */

@media screen and (max-width: 768px) {
    .jpt-points-widget .jpt-points-value,
    .jpt-balance-display .jpt-balance-value {
        font-size: 24px;
    }

    .jpt-redeem-calculator .jpt-redeem-input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .jpt-recharge-buttons {
        flex-direction: column;
    }

    .jpt-subscription-card {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
