/**
 * Account Customizer Styles
 * Stili per le sezioni personalizzate dell'account WooCommerce
 */

/* ============================================
   GENERAL SECTION STYLES
   ============================================ */

.pp-account-section {
    padding: 0 0;
}

.pp-account-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.pp-section-description {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */

.pp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.pp-btn-primary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    color: #fff !important;
}

.pp-btn-primary:hover {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.pp-btn-secondary {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.pp-btn-secondary:hover {
    background: #e5e5e5 !important;
    color: #333 !important;
}

.pp-btn-large {
    padding: 14px 28px !important;
    font-size: 16px !important;
}

/* ============================================
   NOTICES
   ============================================ */

.pp-notice {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pp-notice-info {
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
}

.pp-notice-warning {
    background: #fff8e1;
    border-left: 4px solid #ff9800;
}

.pp-notice p {
    margin: 0 0 15px;
}

.pp-notice .pp-btn {
    margin-top: 5px;
}

/* ============================================
   EDIZIONI GRID
   ============================================ */

.pp-editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pp-edition-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    padding: 10px 15px;
}

.pp-edition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.pp-edition-thumbnail {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f5f5f5;
}

.pp-edition-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-edition-info {
    padding: 0px;
}

.pp-edition-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.pp-edition-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.pp-edition-info .pp-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
}

.pp-see-all {
    text-align: center;
    margin-top: 20px;
}

/* ============================================
   SUBSCRIPTION CARD
   ============================================ */

.pp-subscription-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.pp-subscription-active {
    border-top: 4px solid #4caf50;
}

.pp-subscription-none {
    text-align: center;
    padding: 50px 30px;
}

.pp-subscription-status {
    margin-bottom: 20px;
}

.pp-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.pp-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.pp-status-expired {
    background: #ffebee;
    color: #c62828;
}

/* Subscription Details */
.pp-subscription-details {
    margin-bottom: 25px;
}

.pp-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pp-detail-row:last-child {
    border-bottom: none;
}

.pp-detail-label {
    color: #666;
    font-size: 14px;
}

.pp-detail-value {
    font-weight: 500;
    color: #1a1a2e;
    font-size: 14px;
}

/* Benefits */
.pp-subscription-benefits {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.pp-subscription-benefits h4 {
    margin: 0 0 15px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.pp-subscription-benefits ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-subscription-benefits li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #444;
}

.pp-subscription-benefits li:last-child {
    margin-bottom: 0;
}

.pp-subscription-benefits li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234caf50'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Actions */
.pp-subscription-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pp-bulk-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

/* No Subscription */
.pp-no-subscription {
    max-width: 400px;
    margin: 0 auto;
}

.pp-no-sub-icon {
    color: #ccc;
    margin-bottom: 20px;
}

.pp-no-subscription h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.pp-no-subscription p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

/* ============================================
   DISPOSITIVI SECTION
   ============================================ */

.pp-dispositivi-section .pp-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.pp-dispositivi-section .pp-device-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.pp-dispositivi-section .pp-device-card.active {
    border-color: #4caf50;
}

.pp-dispositivi-section .pp-device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pp-dispositivi-section .pp-device-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.pp-dispositivi-section .pp-device-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
}

.pp-dispositivi-section .pp-device-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.pp-dispositivi-section .pp-device-status.revoked {
    background: #ffebee;
    color: #c62828;
}

.pp-dispositivi-section .pp-device-info p {
    margin: 8px 0;
    font-size: 13px;
    color: #666;
}

.pp-dispositivi-section .pp-device-info strong {
    color: #333;
}

.pp-dispositivi-section .pp-device-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.pp-dispositivi-section .pp-device-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .pp-editions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .pp-subscription-card {
        padding: 20px;
    }

    .pp-detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .pp-subscription-actions {
        flex-direction: column;
    }

    .pp-subscription-actions .pp-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pp-editions-grid {
        grid-template-columns: 1fr;
    }

    .pp-account-section h2 {
        font-size: 20px;
    }
}
