/**
 * VA360 VPS - Public Styles
 */

/* VPS List Header */
.va360-vps-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.va360-vps-list-header h2 {
    margin: 0;
}

.va360-vps-list-header .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.va360-vps-list-header .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Empty State */
.va360-empty-state {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 40px;
}

.va360-empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.va360-empty-state-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #fff;
}

.va360-empty-state h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 20px;
}

.va360-empty-state p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

/* VPS List Grid */
.va360-vps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* VPS Card */
.va360-vps-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.va360-vps-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.va360-vps-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.va360-vps-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.va360-vps-card-body {
    padding: 15px;
}

.va360-vps-card-footer {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

/* VPS Info */
.va360-vps-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.va360-vps-info-item:last-child {
    border-bottom: none;
}

.va360-vps-label {
    color: #666;
    font-size: 13px;
}

.va360-vps-value {
    font-weight: 500;
}

.va360-vps-value code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Status Badges */
.va360-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.va360-status-success {
    background: #d4edda;
    color: #155724;
}

.va360-status-error {
    background: #f8d7da;
    color: #721c24;
}

.va360-status-warning {
    background: #fff3cd;
    color: #856404;
}

.va360-status-info {
    background: #d1ecf1;
    color: #0c5460;
}

.va360-status-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* VPS Management Page */
.va360-vps-manage {
    max-width: 900px;
}

.va360-back-link {
    margin-bottom: 20px;
}

.va360-vps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.va360-vps-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.va360-vps-title h2 {
    margin: 0;
}

.va360-vps-quick-actions {
    display: flex;
    gap: 10px;
}

.va360-vps-quick-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.va360-vps-quick-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* VPS Sections */
.va360-vps-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.va360-vps-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Tables */
.va360-vps-table {
    width: 100%;
    border-collapse: collapse;
}

.va360-vps-table th,
.va360-vps-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.va360-vps-table th {
    font-weight: 600;
    color: #333;
    width: 150px;
}

.va360-vps-table code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 13px;
}

/* Password field */
.va360-password-hidden {
    filter: blur(4px);
    transition: filter 0.2s;
}

.va360-password-visible {
    filter: none;
}

/* Copy and toggle buttons */
.va360-copy-btn,
.va360-toggle-password {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #666;
    vertical-align: middle;
}

.va360-copy-btn:hover,
.va360-toggle-password:hover {
    color: #0073aa;
}

.va360-copy-btn .dashicons,
.va360-toggle-password .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* SSH Command Box */
.va360-ssh-command {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.va360-ssh-command strong {
    color: #aaa;
}

.va360-ssh-command code {
    background: transparent;
    color: #50fa7b;
    font-size: 14px;
    flex: 1;
}

.va360-ssh-command .va360-copy-btn {
    color: #aaa;
}

.va360-ssh-command .va360-copy-btn:hover {
    color: #fff;
}

/* Reinstall Form */
.va360-reinstall-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.va360-reinstall-form select {
    flex: 1;
    max-width: 300px;
}

/* Snapshot Form */
.va360-snapshot-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
}

.va360-snapshot-form input {
    flex: 1;
    max-width: 300px;
}

/* Snapshots Table */
.va360-snapshots-table th,
.va360-snapshots-table td {
    padding: 12px 10px;
}

.va360-snapshots-table .button-small {
    margin-right: 5px;
}

/* Logs Table */
.va360-logs-table {
    font-size: 13px;
}

.va360-logs-table th {
    width: auto;
}

/* Suspended Notice */
.va360-vps-suspended-notice {
    color: #721c24;
    background: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

/* Loading Overlay */
.va360-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.va360-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: va360-spin 1s linear infinite;
}

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

.va360-loading-text {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Region Selector on Product Page */
.va360-vps-region-selector {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.va360-vps-region-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.va360-vps-region-selector select {
    width: 100%;
    padding: 10px;
}

/* VPS Specs in Card */
.va360-vps-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.va360-vps-specs span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.va360-vps-specs .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #666;
}

/* VPS Card Footer Button */
.va360-vps-card-footer .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.va360-vps-card-footer .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ========================================
   NEW VPS SECTION - Plans Grid
   ======================================== */

.va360-new-vps-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.va360-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.va360-section-header h2 {
    margin: 0 0 15px;
    font-size: 28px;
    color: #333;
}

.va360-section-description {
    margin: 0 auto;
    max-width: 600px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

/* Plans Grid */
.va360-vps-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Plan Card */
.va360-plan-card {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.va360-plan-card:hover {
    border-color: #0073aa;
    box-shadow: 0 10px 40px rgba(0, 115, 170, 0.15);
    transform: translateY(-5px);
}

/* Popular Badge */
.va360-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Plan Header */
.va360-plan-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.va360-plan-name {
    margin: 0 0 15px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.va360-plan-price {
    font-size: 14px;
    color: #666;
}

.va360-plan-price .woocommerce-Price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
}

.va360-plan-price .woocommerce-Price-currencySymbol {
    font-size: 18px;
}

.va360-plan-period {
    font-size: 14px;
    color: #888;
    font-weight: normal;
}

/* Plan Specs */
.va360-plan-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.va360-plan-spec {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #444;
}

.va360-plan-spec .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #0073aa;
}

.va360-plan-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Plan Features */
.va360-plan-features {
    list-style: none;
    margin: 20px 0;
    padding: 0;
    flex: 1;
}

.va360-plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}

.va360-plan-features .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #22c55e;
}

/* Plan Footer */
.va360-plan-footer {
    margin-top: auto;
    padding-top: 20px;
}

.va360-plan-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.va360-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .va360-vps-list-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .va360-vps-list-header .button {
        justify-content: center;
    }

    .va360-section-header h2 {
        font-size: 24px;
    }

    .va360-vps-plans-grid {
        grid-template-columns: 1fr;
    }

    .va360-plan-card {
        padding: 25px 20px;
    }
}

@media screen and (max-width: 600px) {
    .va360-vps-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .va360-vps-quick-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .va360-vps-table th {
        width: 100px;
    }

    .va360-reinstall-form,
    .va360-snapshot-form {
        flex-direction: column;
        align-items: stretch;
    }

    .va360-reinstall-form select,
    .va360-snapshot-form input {
        max-width: none;
    }

    .va360-empty-state {
        padding: 40px 20px;
    }

    .va360-empty-state-icon {
        width: 60px;
        height: 60px;
    }

    .va360-empty-state-icon .dashicons {
        font-size: 30px;
        width: 30px;
        height: 30px;
    }

    .va360-new-vps-section {
        margin-top: 30px;
        padding-top: 30px;
    }

    .va360-vps-specs {
        flex-direction: column;
        gap: 4px;
    }

    .va360-vps-specs span {
        justify-content: center;
    }
}
