/**
 * VPS Tab Styles
 * Modern design for WooCommerce My Account VPS tab
 */

.contabo-vps-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Header Section */
.vps-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.vps-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vps-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Empty State */
.vps-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #1e293b;
    border-radius: 16px;
    border: 2px dashed #475569;
    margin: 2rem 0;
}

.empty-icon {
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.vps-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 1rem 0;
}

.vps-empty-state p {
    color: #94a3b8;
    margin: 0 0 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Orders Grid */
.vps-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Order Card */
.vps-order-card {
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    border: 1px solid #334155;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.vps-order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-bottom: 1px solid #475569;
}

.order-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
}

.order-date {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 400;
}

/* Status Badge */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-processing {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-on-hold {
    background: #fecaca;
    color: #991b1b;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-cancelled {
    background: #f3f4f6;
    color: #374151;
}

/* Card Content */
.card-content {
    padding: 1.5rem;
}

.vps-details {
    margin-bottom: 1.5rem;
}

.vps-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
}

.info-row .label {
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.875rem;
}

.info-row .value {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.info-row .value .expired {
    color: #dc2626;
    font-weight: 700;
}

.info-row .value .expiring-soon {
    color: #ea580c;
    font-weight: 700;
}

.no-vps-data {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 1rem;
    background: #334155;
    border-radius: 8px;
    border: 1px dashed #475569;
    margin: 0;
}

/* Card Actions */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

/* VPS Controls */
.vps-controls {
    border-top: 2px solid #475569;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.vps-controls h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 1.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.control-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.btn-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    text-align: center;
    background: #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-control .icon {
    margin-right: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.btn-start {
    color: #4ade80;
    border-color: #22c55e;
}

.btn-start:hover {
    background: #22c55e;
    color: #1e293b;
}

.btn-stop {
    color: #f87171;
    border-color: #ef4444;
}

.btn-stop:hover {
    background: #ef4444;
    color: #1e293b;
}

.btn-restart {
    color: #fb923c;
    border-color: #f97316;
}

.btn-restart:hover {
    background: #f97316;
    color: #1e293b;
}

.btn-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-control.loading {
    position: relative;
    color: transparent;
}

.btn-control.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Special styling for renew order button */
.renew-order {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.renew-order:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5) !important;
    color: white !important;
}

.renew-order:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #f1f5f9;
    border: 2px solid #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    color: #f1f5f9;
    border-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.copy-ip {
    position: relative;
}

.copy-ip::before {
    content: "📋";
    margin-right: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

.copy-password::before {
    content: "🔑";
    margin-right: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

/* Password Field Styles */
.password-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

span.password-field * {
    color: #eee;
}

.password-masked {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.password-visible {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    color: #f1f5f9;
    background: #334155;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #475569;
}

button.toggle-password {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    width: auto;
    min-width: auto;
    outline: 0 !important;
}

.toggle-password i {
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.toggle-password:hover i {
    transform: scale(1.1);
}

.refresh-vps-data::before {
    content: "🔄";
    margin-right: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

.refresh-vps-data:disabled::before {
    content: "⏳";
    animation: spin 1s linear infinite;
    opacity: 0.7;
}

.renew-order::before {
    content: "🔄";
    margin-right: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
}

.renew-order.loading::before {
    content: "⏳";
    animation: spin 1s linear infinite;
    opacity: 0.7;
}

/* Loading States */
.vps-order-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.vps-order-card.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Animation */
.vps-order-card.success {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .contabo-vps-container {
        padding: 1rem;
    }
    
    .vps-header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .vps-header h2 {
        font-size: 2rem;
    }
    
    .vps-orders-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .control-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-control {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .vps-header h2 {
        font-size: 1.75rem;
    }
    
    .vps-header p {
        font-size: 1rem;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-row .value {
        word-break: break-all;
    }
}


/* Disabled Button Styles for VPS Tab */
.vps-button-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.vps-button-disabled:hover {
    opacity: 0.5 !important;
}

/* Server Status Badges in VPS Tab */
.contabo-status-suspended {
    background-color: #dc3545 !important;
    color: #fff !important;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.contabo-status-available {
    background-color: #28a745 !important;
    color: #fff !important;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}



