/* ==============================================
   WP HOSTING MANAGER - FRONTEND STYLES
   Estilos para el panel del cliente en "Mi Cuenta"
============================================== */

/* Variables */
:root {
    --plek-frontend-primary: #007cba;
    --plek-frontend-secondary: #f8f9fa;
    --plek-frontend-border: #ddd;
    --plek-frontend-text: #333;
    --plek-frontend-success: #28a745;
    --plek-frontend-danger: #dc3545;
    --plek-frontend-warning: #ffc107;
}

/* Contenedor principal */
.plek-my-account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header del hosting */
.plek-hosting-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.plek-hosting-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

.plek-hosting-header-content {
    position: relative;
    z-index: 1;
}

.plek-hosting-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.plek-hosting-header .domain {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* Status badge en header */
.plek-header-status {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Grid de hosting */
.plek-hosting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Tarjetas de hosting */
.plek-hosting-card {
    background: white;
    border: 1px solid var(--plek-frontend-border);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plek-hosting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.plek-hosting-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--plek-frontend-secondary);
}

.plek-hosting-card-header h3 {
    margin: 0;
    color: var(--plek-frontend-primary);
    font-size: 18px;
    font-weight: 600;
}

/* Badges */
.plek-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.plek-status-active {
    background: #d4edda;
    color: #155724;
}

.plek-status-suspended {
    background: #fff3cd;
    color: #856404;
}

.plek-status-pending {
    background: #d1ecf1;
    color: #0c5460;
}

/* Especificaciones del hosting */
.plek-specs {
    margin: 20px 0;
}

.plek-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--plek-frontend-secondary);
}

.plek-spec-item:last-child {
    border-bottom: none;
}

.plek-spec-label {
    color: #666;
    font-size: 14px;
}

.plek-spec-value {
    font-weight: 600;
    color: var(--plek-frontend-text);
}

/* Barra de progreso */
.plek-progress-bar {
    height: 8px;
    background: var(--plek-frontend-secondary);
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.plek-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4cd964, #5ac8fa);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Acciones */
.plek-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.plek-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.plek-btn-primary {
    background: var(--plek-frontend-primary);
    color: white;
}

.plek-btn-primary:hover {
    background: #005a87;
    color: white;
    transform: translateY(-2px);
}

.plek-btn-success {
    background: var(--plek-frontend-success);
    color: white;
}

.plek-btn-danger {
    background: var(--plek-frontend-danger);
    color: white;
}

.plek-btn-outline {
    background: transparent;
    border: 2px solid var(--plek-frontend-primary);
    color: var(--plek-frontend-primary);
}

.plek-btn-outline:hover {
    background: var(--plek-frontend-primary);
    color: white;
}

/* Panel de control */
.plek-control-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.plek-control-panel h2 {
    margin-top: 0;
    color: var(--plek-frontend-text);
    border-bottom: 2px solid var(--plek-frontend-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Tabs frontend */
.plek-frontend-tabs {
    display: flex;
    border-bottom: 2px solid var(--plek-frontend-secondary);
    margin-bottom: 20px;
    overflow-x: auto;
}

.plek-frontend-tab {
    padding: 12px 25px;
    background: none;
    border: none;
    color: #666;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.plek-frontend-tab.active {
    color: var(--plek-frontend-primary);
    border-bottom-color: var(--plek-frontend-primary);
}

/* Estadísticas */
.plek-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.plek-stat-card {
    background: var(--plek-frontend-secondary);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.plek-stat-card .number {
    font-size: 24px;
    font-weight: 700;
    color: var(--plek-frontend-primary);
    display: block;
    margin-bottom: 5px;
}

.plek-stat-card .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal */
.plek-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.plek-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.plek-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--plek-frontend-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plek-modal-header h3 {
    margin: 0;
    color: var(--plek-frontend-text);
}

.plek-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
}

.plek-modal-body {
    padding: 20px;
}

/* Mensajes */
.plek-message {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid;
}

.plek-message-success {
    background: #d4edda;
    border-left-color: var(--plek-frontend-success);
    color: #155724;
}

.plek-message-error {
    background: #f8d7da;
    border-left-color: var(--plek-frontend-danger);
    color: #721c24;
}

/* Loading */
.plek-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--plek-frontend-primary);
    border-radius: 50%;
    animation: plek-spin 1s linear infinite;
}

@keyframes plek-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .plek-hosting-grid {
        grid-template-columns: 1fr;
    }
    
    .plek-hosting-header {
        padding: 20px;
    }
    
    .plek-hosting-header h1 {
        font-size: 22px;
    }
    
    .plek-actions {
        flex-direction: column;
    }
    
    .plek-btn {
        width: 100%;
        justify-content: center;
    }
    
    .plek-frontend-tabs {
        flex-wrap: wrap;
    }
    
    .plek-frontend-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

/* Integración con WooCommerce */
.woocommerce-MyAccount-navigation ul li.plek-hosting a:before {
    content: "⚙️";
    margin-right: 10px;
}