/* Butler Customer Dashboard Styles */

.butler-customer-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.butler-customer-dashboard h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.butler-customer-dashboard h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
}

/* Stats Cards */
.butler-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-width: 120px;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2271b1;
}

/* Actions */
.butler-actions {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.butler-actions .button {
    margin-right: 10px;
}

#refresh-status {
    margin-left: 10px;
    font-style: italic;
    color: #666;
}

/* DNS Controls */
.butler-dns-controls {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.domain-selector {
    flex: 1;
    min-width: 200px;
}

.domain-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.domain-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.dns-actions {
    display: flex;
    gap: 10px;
}

/* Tables */
.butler-domains-table,
.butler-dns-records-table {
    margin-top: 20px;
}

.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.woocommerce-orders-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.woocommerce-orders-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

.woocommerce-orders-table tr:hover {
    background: #f8f9fa;
}

.woocommerce-orders-table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-suspended {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #cce5f0;
    color: #0c5460;
}

/* Auto Renew Status */
.auto-renew-yes {
    color: #28a745;
    font-weight: 600;
}

.auto-renew-no {
    color: #dc3545;
    font-weight: 600;
}

/* Expiry Warnings */
.expiring-soon {
    color: #ffc107;
    font-weight: 600;
}

.expired {
    color: #dc3545;
    font-weight: 600;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    transition: background-color 0.2s;
}

.button:hover {
    background: #135e96;
    color: #fff;
    text-decoration: none;
}

.button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.button-primary {
    background: #0073aa;
}

.button-primary:hover {
    background: #005a87;
}

.button-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.form-row small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* No Domains Message */
.butler-no-domains {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.butler-no-domains h2 {
    color: #333;
    margin-bottom: 15px;
}

.butler-no-domains p {
    color: #666;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .butler-stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: auto;
    }
    
    .butler-dns-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .domain-selector {
        min-width: auto;
    }
    
    .dns-actions {
        justify-content: flex-start;
    }
    
    .woocommerce-orders-table {
        font-size: 14px;
    }
    
    .woocommerce-orders-table th,
    .woocommerce-orders-table td {
        padding: 8px 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.butler-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.butler-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.butler-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.butler-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* cPanel Controls */
.butler-cpanel-controls {
    margin: 20px 0;
}

.add-domain-section,
.tracked-domains-section,
.live-cpanel-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-domain-section h3,
.tracked-domains-section h3,
.live-cpanel-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

/* Domain Type Badges */
.domain-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.addon-type {
    background: #d4edda;
    color: #155724;
}

.subdomain-type {
    background: #cce5f0;
    color: #0c5460;
}

/* Status badges for cPanel domains */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.error-message {
    color: #721c24;
    font-style: italic;
    margin-top: 4px;
    display: block;
}
