/* ProQyz Digital Downloads Styles - Overhaul */

/* --- Main Layout Overhaul --- */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: column;
}

/* --- Header / Welcome Section --- */
.proqyz-account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.proqyz-user-avatar img {
    border-radius: 50%;
    border: 3px solid #e0e7ff;
}

.proqyz-user-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #111827;
}

.proqyz-user-info p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

/* --- Navigation Bar (Top Tabs) --- */
.woocommerce-MyAccount-navigation {
    float: none !important;
    width: 100% !important;
    margin-bottom: 30px;
    border: none;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e5e7eb;
}

.woocommerce-MyAccount-navigation li {
    border: none !important;
    margin: 0 !important;
}

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 20px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    position: relative;
    top: 2px;
    border-bottom: 2px solid transparent;
}

.woocommerce-MyAccount-navigation li.is-active a {
    color: #2563eb;
    background: transparent;
    border-bottom: 2px solid #2563eb;
}

.woocommerce-MyAccount-navigation li a:hover {
    color: #111827;
    background: #f9fafb;
}

/* --- Content Area --- */
.woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
}

/* --- Resources Grid (Dashboard) --- */
.proqyz-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.proqyz-resource-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.proqyz-resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.proqyz-res-icon {
    width: 48px;
    height: 48px;
    background: #f0fdf4;
    /* Light green - default example */
    color: #16a34a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* Specific colors for specific cards could be done via nth-child or distinct classes logic if desired, 
   but keeping unified for cleanliness. */

.proqyz-resource-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.proqyz-resource-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Social Links specific styling */
.proqyz-social-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.proqyz-social-links a {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb !important;
    text-decoration: none;
}

.proqyz-social-links a:hover {
    text-decoration: underline;
}

/* --- Informational Notice --- */
.proqyz-dd-notice {
    background: #eff6ff;
    /* Light blue */
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.proqyz-notice-icon {
    color: #2563eb;
    background: #fff;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.proqyz-notice-content {
    flex: 1;
}

.proqyz-notice-content strong {
    display: block;
    color: #1e3a8a;
    font-size: 16px;
    margin-bottom: 4px;
}

.proqyz-notice-content p {
    margin: 0 0 10px 0;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.5;
}

.proqyz-notice-content a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.proqyz-notice-link {
    display: inline-block;
    color: #2563eb;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
}

.proqyz-notice-link:hover {
    text-decoration: underline !important;
}


/* --- Downloads List (Refined Row Layout) --- */
.proqyz-dd-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proqyz-dd-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow 0.2s;
}

.proqyz-dd-row:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.proqyz-dd-row-info {
    flex: 1;
    min-width: 0;
    /* important for flex ellipsis */
    padding-right: 20px;
}

.proqyz-dd-row-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.proqyz-dd-row-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b7280;
    gap: 6px;
}

.proqyz-meta-badge {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    color: #374151;
    font-weight: 500;
}

.proqyz-meta-divider {
    color: #d1d5db;
}

.proqyz-dd-btn-download-sm {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background-color: #111827 !important;
    color: #ffffff !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color 0.2s !important;
}

.proqyz-dd-btn-download-sm:hover {
    background-color: #000000 !important;
}

/* Empty State */
.proqyz-dd-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #d1d5db;
}

.proqyz-dd-empty-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: #f3f4f6;
    border-radius: 50%;
    margin-bottom: 20px;
    color: #9ca3af;
}

/* --- Renewal Widget (Spacetree) --- */
.proqyz-renewal-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #2563eb;
    /* Default Active Color */
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.proqyz-renewal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    opacity: 0.1;
}

/* Status Variants */
.proqyz-status-good {
    border-left-color: #10b981;
    /* Green */
}

.proqyz-status-warn {
    border-left-color: #f59e0b;
    /* Orange */
    background: #fffbeb;
}

.proqyz-status-expired {
    border-left-color: #ef4444;
    /* Red */
    background: #fef2f2;
}

.proqyz-renewal-info {
    flex: 1;
}

.proqyz-service-badge {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.proqyz-renewal-info h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.proqyz-renewal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.proqyz-days-count {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.proqyz-status-pill {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    color: #4b5563;
}

/* Specific pill colors matching card variant logic in PHP could be done here too, 
   but simplistic is fine or rely on cascading. */
.proqyz-status-good .proqyz-status-pill {
    background: #d1fae5;
    color: #065f46;
}

.proqyz-status-warn .proqyz-status-pill {
    background: #fef3c7;
    color: #92400e;
}

.proqyz-status-expired .proqyz-status-pill {
    background: #fee2e2;
    color: #b91c1c;
}


.proqyz-renewal-action {
    margin-left: 24px;
}

.proqyz-btn-renew {
    display: inline-flex !important;
    align-items: center;
    padding: 12px 24px !important;
    background-color: #2563eb !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    border: none !important;
}

.proqyz-btn-renew:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
    .proqyz-account-header {
        flex-direction: column;
        text-align: center;
    }

    .woocommerce-MyAccount-navigation ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
        border-bottom: 1px solid #e5e7eb;
    }

    .woocommerce-MyAccount-navigation li a {
        white-space: nowrap;
        padding: 12px 16px;
    }

    .proqyz-dd-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .proqyz-dd-row-action {
        width: 100%;
    }

    .proqyz-dd-btn-download-sm {
        width: 100%;
        justify-content: center;
    }

    .proqyz-renewal-card {
        flex-direction: column;
        text-align: center;
        align-items: stretch;
    }

    .proqyz-renewal-action {
        margin: 20px 0 0 0;
    }

    .proqyz-btn-renew {
        justify-content: center;
        width: 100%;
    }

    .proqyz-renewal-meta {
        justify-content: center;
    }
}