/**
 * Frontend Styles for FidelityEbriza Plugin
 *
 * @package FidelityEbriza
 * @since   1.0.0
 */

/* ==========================================================================
   Registration Form
   ========================================================================== */

.fidelity-registration-wrapper,
.fidelity-dashboard-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.fidelity-registration-form,
.fidelity-verification-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fidelity-registration-form h2,
.fidelity-verification-form h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 28px;
    color: #333;
}

.fidelity-form-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.fidelity-form-group {
    margin-bottom: 20px;
}

.fidelity-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.fidelity-form-group .required {
    color: #d63638;
}

.fidelity-form-group input[type="text"],
.fidelity-form-group input[type="email"],
.fidelity-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.fidelity-form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.fidelity-form-group .description {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.fidelity-form-messages {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.fidelity-form-messages.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.fidelity-form-messages.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.fidelity-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.fidelity-btn:hover {
    transform: translateY(-1px);
}

.fidelity-btn:active {
    transform: translateY(0);
}

.fidelity-btn-primary {
    background: #2271b1;
    color: #fff;
    margin-right: 10px;
}

.fidelity-btn-primary:hover {
    background: #135e96;
}

.fidelity-btn-secondary {
    background: #f0f0f1;
    color: #333;
}

.fidelity-btn-secondary:hover {
    background: #dcdcde;
}

.fidelity-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.fidelity-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.fidelity-dashboard-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.dashboard-subtitle {
    color: #666;
    font-size: 18px;
}

/* Tier Progress */
.fidelity-tier-progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    color: #fff;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.tier-badge-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.tier-progress-info {
    flex: 1;
}

.tier-progress-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.tier-progress-info p {
    margin: 10px 0;
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 15px;
    transition: width 0.5s ease;
}

.progress-details {
    font-size: 14px;
    opacity: 0.9;
}

.tier-max {
    font-size: 20px;
    font-weight: bold;
}

.score-breakdown {
    margin-top: 20px;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
}

.score-breakdown h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.score-breakdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.score-breakdown li {
    padding: 5px 0;
    font-size: 14px;
}

/* Stats Cards */
.fidelity-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.fidelity-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.fidelity-stat-card .stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.fidelity-stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fidelity-stat-card .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* Badges Section */
.fidelity-badges-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
}

.fidelity-badges-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.badge-item {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.2s;
}

.badge-item:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.badge-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.badge-emoji {
    font-size: 50px;
}

.badge-item h4 {
    margin: 10px 0 5px 0;
    font-size: 16px;
    color: #333;
}

.badge-date {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Transactions Section */
.fidelity-transactions-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
}

.fidelity-transactions-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

.no-transactions {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 16px;
}

.transactions-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.fidelity-transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.fidelity-transactions-table thead th {
    background: #f9f9f9;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.fidelity-transactions-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.fidelity-transactions-table tbody tr:hover {
    background: #f9f9f9;
}

/* Pagination */
.fidelity-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
}

.fidelity-pagination .page-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.fidelity-pagination .page-btn:hover {
    background: #135e96;
}

.fidelity-pagination .page-info {
    color: #666;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .fidelity-tier-progress {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .tier-badge-large {
        margin-bottom: 20px;
    }

    .fidelity-stats-grid {
        grid-template-columns: 1fr;
    }

    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .fidelity-registration-form,
    .fidelity-verification-form {
        padding: 30px 20px;
    }

    .fidelity-transactions-table {
        font-size: 14px;
    }

    .fidelity-transactions-table thead th,
    .fidelity-transactions-table tbody td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .fidelity-dashboard-header h1 {
        font-size: 24px;
    }

    .dashboard-subtitle {
        font-size: 16px;
    }

    .fidelity-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}
