/**
 * Frontend CSS for Bee1 Consent Manager
 * Checkout and My Account styling
 */

/* ===================================
   Checkout Integration
   =================================== */

.bee1-consent-wrapper {
    background: #f7f9fc;
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.bee1-consent-wrapper label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    cursor: pointer;
}

.bee1-consent-wrapper input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
}

.bee1-consent-granular {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.bee1-consent-granular p {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.bee1-consent-granular label {
    margin-bottom: 8px;
    font-weight: normal;
}

.bee1-consent-granular .description {
    display: block;
    font-size: 13px;
    color: #666;
    margin: 5px 0 0 28px;
}

.bee1-consent-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bee1-consent-toggle:hover {
    color: #005a87;
    text-decoration: underline;
}

.bee1-consent-privacy {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #666;
    padding: 10px;
    background: #fffbcc;
    border-left: 3px solid #ffcc00;
    border-radius: 3px;
}

/* ===================================
   My Account Page
   =================================== */

.bee1-consent-my-account {
    max-width: 800px;
}

.bee1-consent-my-account h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Status Box */
.bee1-consent-status {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
}

.bee1-consent-status.subscribed {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.bee1-consent-status.unsubscribed {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.bee1-consent-status .status-icon {
    font-size: 32px;
    line-height: 1;
}

.bee1-consent-status .status-text {
    flex: 1;
}

/* Statistics Grid */
.bee1-consent-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #007cba;
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* Preferences Form */
.bee1-consent-form {
    background: #fff;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bee1-consent-form h3 {
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
    font-size: 18px;
}

.bee1-consent-form h3:first-child {
    margin-top: 0;
}

.bee1-consent-form h4 {
    margin: 15px 0 10px 0;
    font-size: 15px;
    color: #333;
}

.bee1-consent-granular-prefs {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.bee1-consent-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.bee1-consent-channels.bee1-layout-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.bee1-consent-channels.bee1-layout-block {
    display: block;
}

.bee1-consent-channels.bee1-layout-block label {
    display: block;
    margin-bottom: 10px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.form-field label:hover {
    color: #007cba;
}

.form-field .description {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    margin-left: 28px;
    line-height: 1.5;
}

/* Action Buttons */
.bee1-consent-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.bee1-consent-actions button {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bee1-consent-actions .button-primary {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
}

.bee1-consent-actions .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.bee1-consent-actions .button-secondary {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.bee1-consent-actions .button-secondary:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Consent History */
.bee1-consent-history {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.bee1-consent-history h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.bee1-consent-history table {
    width: 100%;
    border-collapse: collapse;
}

.bee1-consent-history th {
    text-align: left;
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
}

.bee1-consent-history td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.bee1-consent-history details {
    cursor: pointer;
    color: #007cba;
}

.bee1-consent-history summary {
    user-select: none;
}

.bee1-consent-history summary:hover {
    text-decoration: underline;
}

.bee1-consent-history pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    overflow-x: auto;
    margin: 10px 0 0 0;
}

/* GDPR Notice */
.bee1-consent-gdpr {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    margin-top: 30px;
}

.bee1-consent-gdpr h3 {
    margin-top: 0;
    color: #005a87;
}

.bee1-consent-gdpr ul {
    margin: 15px 0;
    padding-left: 20px;
}

.bee1-consent-gdpr li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .bee1-consent-stats {
        grid-template-columns: 1fr;
    }
    
    .bee1-consent-channels {
        grid-template-columns: 1fr;
    }
    
    .bee1-consent-actions {
        flex-direction: column;
    }
    
    .bee1-consent-actions button {
        width: 100%;
    }
    
    .bee1-consent-wrapper {
        padding: 15px;
    }
    
    .bee1-consent-form {
        padding: 15px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .bee1-consent-status {
        flex-direction: column;
        text-align: center;
    }
    
    .bee1-consent-history table {
        font-size: 14px;
    }
    
    .bee1-consent-history th,
    .bee1-consent-history td {
        padding: 8px 5px;
    }
}

/* ===================================
   Animations
   =================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bee1-consent-granular.show {
    animation: slideDown 0.3s ease;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .bee1-consent-actions,
    .bee1-consent-toggle {
        display: none;
    }
}
