/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Dashboard Layout */
.wcd-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

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

.wcd-user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wcd-user-info-item {
    margin-right: 20px;
}

.wcd-dashboard-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.wcd-dashboard-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f7f7f7;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wcd-dashboard-btn:hover {
    background-color: #eee;
    color: #000;
}

.wcd-dashboard-btn i {
    margin-right: 5px;
}

/* Dashboard Sections */
.wcd-dashboard-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    padding: 25px;
}

.wcd-dashboard-section-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

/* Subscription Tabs */
.wcd-subscription-tabs {
    margin-bottom: 20px;
    border-bottom: none; /* Remove any bottom border */
}

.wcd-tabs-header {
    display: flex;
    flex-wrap: nowrap; /* Don't wrap tabs for mobile sliding */
    overflow-x: auto; /* Enable horizontal scrolling */
    overflow-y: hidden; /* Hide vertical scrollbar */
    border-bottom: none; /* Remove bottom border */
    margin-bottom: 20px;
    padding-bottom: 0;
    gap: 5px;
    max-width: 100%; /* Prevent overflow */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Individual tab styling */
.wcd-tab {
    position: relative;
    border-bottom: 1px solid #ddd; /* Add border to each tab */
}

/* Blue indicator for active subscription button only */
.wcd-tab.active {
    border-bottom: 3px solid #0073aa; /* Blue line only under active tab */
}

.wcd-tab {
    padding: 10px 15px;
    background-color: #f7f7f7;
    color: #555;
    text-decoration: none;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wcd-tab:hover {
    background-color: #eee;
    color: #333;
}

.wcd-tab.active {
    background-color: #fff;
    color: #000;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    font-weight: 600;
}

/* Subscription Status */
.wcd-subscription-status {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.wcd-status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.wcd-status-badge.active {
    background-color: #e6f7e6;
    color: #2e7d32;
}

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

.wcd-status-badge.pending {
    background-color: #fff8e1;
    color: #ff8f00;
}

/* Credentials Card */
.wcd-credentials-container {
    margin-bottom: 20px;
}

.wcd-credentials-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.wcd-credentials-header {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.wcd-credentials-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.wcd-credentials-body {
    padding: 20px;
}

.wcd-credential-item {
    display: flex;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wcd-credential-label {
    font-weight: 600;
    width: 150px;
    min-width: 150px;
    color: #555;
}

.wcd-credential-value {
    flex: 1;
    word-break: break-all;
}

.wcd-credential-value a {
    color: #0073aa;
    text-decoration: none;
}

.wcd-credential-value a:hover {
    text-decoration: underline;
}

.wcd-credentials-footer {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.wcd-credential-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.wcd-credential-meta-item {
    display: flex;
    align-items: center;
}

.wcd-credential-meta-label {
    font-weight: 600;
    margin-right: 5px;
    color: #555;
}

.wcd-credential-meta-value {
    color: #333;
}

/* Setup Guide */
.wcd-setup-guide {
    text-align: center;
    padding: 20px 0;
}

.wcd-setup-guide-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.wcd-setup-guide-btn:hover {
    background-color: #005f8b;
    color: #fff;
}

/* Plan Selector */
.wcd-simple-plan-selector {
    padding: 10px 0;
}

.wcd-simple-plan-form {
    width: 100%;
}

.wcd-plan-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.wcd-selector-column {
    flex: 1;
    min-width: 200px;
}

.wcd-selector-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.wcd-selector {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.wcd-price-column {
    padding: 0 15px;
    min-width: 120px;
}

.wcd-price-label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.wcd-price-value {
    font-size: 20px;
    font-weight: 700;
    color: #28a745 !important;
}

/* Ensure all price numbers are green */
#wcd-price-display {
    color: #28a745 !important;
}

/* Make dropdown price numbers green */
.wcd-selector option[value]:not([value=""]) {
    color: #28a745 !important;
    font-weight: 500;
}

/* Ensure all price numbers are green */
#wcd-price-display {
    color: #28a745;
}

select option {
    color: #333;
}

/* Make dropdown price numbers green */
.wcd-selector option[value]:not([value=""]) {
    color: #28a745;
    font-weight: 500;
}

.wcd-button-column {
    min-width: 150px;
}

.wcd-order-now-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wcd-order-now-btn:hover {
    background-color: #005f8b;
}

/* Payment Options */
.wcd-payment-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.wcd-payment-option {
    text-align: center;
    width: 100px;
}

.wcd-payment-icon {
    margin-bottom: 10px;
}

.wcd-payment-name {
    font-size: 14px;
    color: #555;
}

/* Support Section */
.wcd-support-message {
    text-align: center;
    margin-bottom: 20px;
}

.wcd-support-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.wcd-support-option {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f7f7f7;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.wcd-support-option:hover {
    background-color: #eee;
    color: #000;
}

.wcd-support-option i {
    margin-right: 8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .wcd-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wcd-user-info {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .wcd-user-info-item {
        margin-right: 0;
    }
    
    .wcd-dashboard-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .wcd-plan-row {
        flex-direction: column;
    }
    
    .wcd-selector-column, 
    .wcd-price-column, 
    .wcd-button-column {
        width: 100%;
    }
    
    .wcd-credential-item {
        flex-direction: column;
    }
    
    .wcd-credential-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .wcd-credential-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Expiration Notification */
.wcd-expiration-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ff8f00;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.wcd-expiration-notice.expired {
    background-color: #ffebee;
    border-left-color: #c62828;
}

.wcd-expiration-notice h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #ff8f00;
}

.wcd-expiration-notice.expired h3 {
    color: #c62828;
}

.wcd-expiration-notice p {
    margin-bottom: 10px;
}

.wcd-expiration-notice .wcd-renew-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #ff8f00;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.wcd-expiration-notice.expired .wcd-renew-btn {
    background-color: #c62828;
}

.wcd-expiration-notice .wcd-renew-btn:hover {
    background-color: #f57c00;
    color: #fff;
}

.wcd-expiration-notice.expired .wcd-renew-btn:hover {
    background-color: #b71c1c;
}

/* Login Error Styling */
.woocommerce-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.woocommerce-error strong {
    font-weight: 600;
}

.woocommerce-error a {
    color: #721c24;
    text-decoration: underline;
    font-weight: 600;
}

.woocommerce-error a:hover {
    color: #5a171d;
}

/* Widget-based Dashboard Layout */
.wcd-widget-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wcd-widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.wcd-widget-header {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.wcd-widget-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.wcd-widget-body {
    padding: 20px;
}

.wcd-widget-footer {
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* Responsive Widget Layout */
@media (max-width: 768px) {
    .wcd-widget-container {
        grid-template-columns: 1fr;
    }
}
