/**
 * ParlaJam Theme - My Account Dashboard Styles
 */

/* Dashboard Container */
.pj-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Welcome Banner */
.pj-welcome-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1) 0%, rgba(74, 111, 165, 0.05) 100%);
    border: 1px solid rgba(74, 111, 165, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pj-welcome-icon {
    width: 48px;
    height: 48px;
    background: var(--pj-primary, #4a6fa5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pj-welcome-content {
    flex: 1;
}

.pj-welcome-content h3 {
    margin: 0 0 0.25rem;
    color: var(--pj-primary, #4a6fa5);
    font-size: 1.25rem;
}

.pj-welcome-content p {
    margin: 0;
    color: var(--pj-gray, #6b7280);
    font-size: 0.95rem;
}

.pj-welcome-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--pj-gray, #6b7280);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.pj-welcome-close:hover {
    opacity: 1;
}

/* Dashboard Header */
.pj-dashboard-header {
    margin-bottom: 2rem;
}

.pj-dashboard-header h2 {
    font-size: 1.75rem;
    color: var(--pj-dark, #1f2937);
    margin: 0 0 0.5rem;
}

.pj-dashboard-header p {
    color: var(--pj-gray, #6b7280);
    margin: 0;
    font-size: 1rem;
}

/* Dashboard Grid */
.pj-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .pj-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.pj-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pj-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.pj-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.03) 0%, transparent 100%);
}

.pj-card-header svg {
    color: var(--pj-primary, #4a6fa5);
}

.pj-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pj-dark, #1f2937);
}

.pj-card-body {
    padding: 1.5rem;
}

/* Trial Info */
.pj-trial-info {
    margin-bottom: 1.5rem;
}

.pj-trial-days {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pj-trial-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--pj-primary, #4a6fa5);
    line-height: 1;
}

.pj-trial-label {
    font-size: 1rem;
    color: var(--pj-gray, #6b7280);
}

.pj-trial-progress {
    margin-bottom: 0.5rem;
}

.pj-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.pj-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pj-primary, #4a6fa5), #6b8cbe);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pj-progress-text {
    font-size: 0.85rem;
    color: var(--pj-gray, #6b7280);
}

/* Subscription Info */
.pj-subscription-info {
    margin-bottom: 1.5rem;
}

.pj-plan-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--pj-primary, #4a6fa5), #6b8cbe);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.pj-plan-badge.yearly {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.pj-renews {
    color: var(--pj-gray, #6b7280);
    font-size: 0.9rem;
    margin: 0;
}

.pj-no-subscription {
    color: var(--pj-gray, #6b7280);
    margin-bottom: 1rem;
}

/* Sites List */
.pj-sites-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pj-site-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pj-site-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pj-site-item:first-child {
    padding-top: 0;
}

.pj-site-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pj-site-name {
    font-weight: 600;
    color: var(--pj-dark, #1f2937);
}

.pj-site-url {
    font-size: 0.85rem;
    color: var(--pj-gray, #6b7280);
}

.pj-status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pj-status-trial {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.pj-status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.pj-status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* No Sites */
.pj-no-sites {
    text-align: center;
    padding: 1rem 0;
}

.pj-no-sites svg {
    color: var(--pj-gray, #6b7280);
    margin-bottom: 1rem;
}

.pj-no-sites p {
    margin: 0 0 0.5rem;
    color: var(--pj-gray, #6b7280);
}

.pj-help-text {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Plugin Download */
.pj-plugin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pj-plugin-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(74, 111, 165, 0.1) 0%, rgba(74, 111, 165, 0.05) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pj-primary, #4a6fa5);
}

.pj-plugin-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pj-plugin-name {
    font-weight: 600;
    color: var(--pj-dark, #1f2937);
}

.pj-plugin-version {
    font-size: 0.85rem;
    color: var(--pj-gray, #6b7280);
}

/* Quick Links */
.pj-quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pj-quick-links li {
    margin-bottom: 0.5rem;
}

.pj-quick-links li:last-child {
    margin-bottom: 0;
}

.pj-quick-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    color: var(--pj-dark, #1f2937);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.pj-quick-links a:hover {
    background: var(--pj-primary, #4a6fa5);
    color: white;
}

.pj-quick-links a svg {
    flex-shrink: 0;
}

/* Buttons */
.pj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: center;
}

.pj-btn-primary {
    background: linear-gradient(135deg, var(--pj-primary, #4a6fa5), #6b8cbe);
    color: white;
}

.pj-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 111, 165, 0.4);
    color: white;
}

.pj-btn-secondary {
    background: rgba(74, 111, 165, 0.1);
    color: var(--pj-primary, #4a6fa5);
}

.pj-btn-secondary:hover {
    background: rgba(74, 111, 165, 0.2);
    color: var(--pj-primary, #4a6fa5);
}

.pj-btn-download {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.pj-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .pj-dashboard {
        padding: 1rem;
    }

    .pj-welcome-banner {
        flex-direction: column;
        text-align: center;
    }

    .pj-card-body {
        padding: 1rem;
    }

    .pj-trial-number {
        font-size: 2.5rem;
    }

    .pj-site-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pj-plugin-info {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   Plan Selection Modal
   ======================================== */

.pj-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.pj-modal.pj-modal-visible {
    display: flex;
}

.pj-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.pj-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.pj-modal.pj-modal-open .pj-modal-content {
    transform: scale(1) translateY(0);
}

.pj-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--pj-gray, #6b7280);
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.pj-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--pj-dark, #1f2937);
}

.pj-modal-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pj-dark, #1f2937);
    text-align: center;
}

.pj-savings-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.pj-savings-banner strong {
    display: block;
    color: #059669;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pj-savings-banner span {
    font-size: 0.85rem;
    color: var(--pj-gray, #6b7280);
}

.pj-plan-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pj-plan-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pj-plan-option:hover {
    border-color: var(--pj-primary, #4a6fa5);
    background: rgba(74, 111, 165, 0.02);
}

.pj-plan-option.pj-plan-selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.pj-plan-option.pj-plan-selected.pj-plan-yearly {
    border-color: #10b981;
}

.pj-plan-option input[type="radio"] {
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    accent-color: #10b981;
}

.pj-plan-details {
    flex: 1;
}

.pj-plan-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.pj-plan-header strong {
    color: var(--pj-dark, #1f2937);
    font-size: 1rem;
}

.pj-save-badge {
    background: #dc2626;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pj-plan-desc {
    font-size: 0.875rem;
    color: var(--pj-gray, #6b7280);
}

.pj-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.pj-modal-actions .pj-btn {
    width: auto;
    padding: 0.875rem 1.75rem;
}

.pj-modal-actions .pj-btn-secondary {
    background: transparent;
    border: 1px solid #e5e7eb;
}

.pj-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pj-spinner {
    animation: pj-spin 1s linear infinite;
}

@keyframes pj-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modal responsive */
@media (max-width: 480px) {
    .pj-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .pj-modal-title {
        font-size: 1.25rem;
    }

    .pj-modal-actions {
        flex-direction: column-reverse;
    }

    .pj-modal-actions .pj-btn {
        width: 100%;
    }

    .pj-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
