/**
 * Frontend Styles for CullDex App Token Manager
 *
 * @package CullDexAppTokenManager
 */

/* My Account Tab Styles */
.cldx-account-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cldx-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cldx-account-title {
    margin: 0;
    color: #333;
}

.cldx-account-tier {
    font-size: 1.2em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.cldx-tier-free {
    color: #6c757d;
}

.cldx-tier-light {
    color: #28a745;
}

.cldx-tier-pro {
    color: #007bff;
}

.cldx-tier-enterprise {
    color: #ffc107;
}

/* Token Balance Display */
.cldx-balance-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.cldx-balance-title {
    margin-top: 0;
    color: #495057;
}

.cldx-balance-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #007cba;
    text-align: center;
    margin: 10px 0;
}

.cldx-balance-details {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.cldx-balance-detail-item {
    text-align: center;
}

.cldx-balance-detail-label {
    font-size: 0.9em;
    color: #6c757d;
}

.cldx-balance-detail-value {
    font-weight: bold;
    font-size: 1.1em;
}

/* Token History Table */
.cldx-history-section {
    margin-top: 30px;
}

.cldx-history-title {
    margin-top: 0;
    color: #495057;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cldx-transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.cldx-transaction-table th,
.cldx-transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cldx-transaction-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.cldx-transaction-table tr:hover {
    background-color: #f5f5f5;
}

/* Token Type Badges */
.cldx-token-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.cldx-badge-credit {
    background-color: #d4edda;
    color: #155724;
}

.cldx-badge-debit {
    background-color: #f8d7da;
    color: #721c24;
}

.cldx-badge-refund {
    background-color: #fff3cd;
    color: #856404;
}

.cldx-badge-admin-send {
    background-color: #cce5ff;
    color: #004085;
}

.cldx-badge-group-send {
    background-color: #e2e3e5;
    color: #383d41;
}

.cldx-badge-subscription-reset {
    background-color: #d1ecf1;
    color: #0c5460;
}

.cldx-badge-top-up {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Action Buttons */
.cldx-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cldx-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cldx-btn-primary {
    background-color: #007cba;
    color: white;
}

.cldx-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.cldx-btn:hover {
    opacity: 0.9;
}

/* Trial Section Styles */
.cldx-trial-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cldx-trial-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.4em;
}

.cldx-trial-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.cldx-trial-section ul.cldx-trial-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.cldx-trial-section ul.cldx-trial-features li {
    padding: 8px 0 8px 30px;
    position: relative;
}

.cldx-trial-section ul.cldx-trial-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #a5b4fc;
    font-weight: bold;
}

.cldx-trial-btn {
    background: #fff;
    color: #667eea;
    font-weight: bold;
    border: none;
    padding: 12px 30px;
    margin-top: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.cldx-trial-btn:hover {
    background: #f0f0ff;
    color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cldx-trial-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cldx-trial-active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.cldx-trial-used {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cldx-error-message {
    color: #fff;
    background: rgba(255, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    display: inline-block;
}

/* ── Registration Form ──────────────────────────────────── */
.cldx-register-wrapper {
    background: #0a0a0a;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.cldx-register-card {
    background: #16182a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    color: #f9fafb;
    box-sizing: border-box;
}

.cldx-register-header {
    margin-bottom: 2rem;
}

.cldx-register-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.cldx-register-header p {
    color: #9ca3af;
    margin: 0;
    font-size: 0.9375rem;
}

.cldx-form-row {
    display: flex;
    gap: 1rem;
}

.cldx-form-row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cldx-form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cldx-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.375rem;
}

.cldx-form-group input[type="text"],
.cldx-form-group input[type="email"],
.cldx-form-group input[type="password"] {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #f9fafb;
    outline: none;
    transition: border-color 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.cldx-form-group input[type="text"]:focus,
.cldx-form-group input[type="email"]:focus,
.cldx-form-group input[type="password"]:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.cldx-form-group input::placeholder {
    color: #4b5563;
}

.cldx-field-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.3rem;
}

.cldx-register-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #fca5a5;
    margin-bottom: 1.25rem;
}

.cldx-confirm-notice {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.5rem;
    padding: 1.25rem 1rem;
    font-size: 0.9375rem;
    color: #86efac;
    text-align: center;
    line-height: 1.5;
}

.cldx-register-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #ffffff;
    color: #0a0a0a;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 0.5rem;
    text-align: center;
}

.cldx-register-btn:hover:not(:disabled) {
    background: #e5e7eb;
}

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

.cldx-register-footer {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.cldx-register-footer a {
    color: #a5b4fc;
    text-decoration: none;
}

.cldx-register-footer a:hover {
    text-decoration: underline;
}

.cldx-already-registered {
    font-size: 0.9375rem;
    color: #6b7280;
}

/* ── Login Form extras ──────────────────────────────────── */
.cldx-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.375rem;
}

.cldx-label-row label {
    margin-bottom: 0;
}

.cldx-forgot-link {
    font-size: 0.8125rem;
    color: #a5b4fc;
    text-decoration: none;
}

.cldx-forgot-link:hover {
    text-decoration: underline;
}

.cldx-remember-row {
    margin-bottom: 1.25rem;
}

.cldx-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d1d5db;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
}

.cldx-checkbox-label input[type="checkbox"] {
    accent-color: #a5b4fc;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* ── Responsive Design ──────────────────────────────────── */
@media (max-width: 768px) {
    .cldx-account-container {
        margin: 10px;
        padding: 15px;
    }
    
    .cldx-balance-details {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .cldx-action-buttons {
        flex-direction: column;
    }
    
    .cldx-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cldx-form-row--split {
        grid-template-columns: 1fr;
    }

    .cldx-register-card {
        padding: 1.75rem 1.25rem;
    }
}