

/* Specific styles for the wp-sub-accounts form */
#wp-sub-accounts-form {
    max-width: 100%;
    margin: 0 auto 30px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
    overflow: hidden;
}

#wp-sub-accounts-form input[type="text"],
#wp-sub-accounts-form input[type="email"],
#wp-sub-accounts-form input[type="password"],
#wp-sub-accounts-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#wp-sub-accounts-form input[type="text"]:focus,
#wp-sub-accounts-form input[type="email"]:focus,
#wp-sub-accounts-form input[type="password"]:focus,
#wp-sub-accounts-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#wp-sub-accounts-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#wp-sub-accounts-form button[type="submit"] {
    width: auto;
    min-width: 320px;
    padding: 15px 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: block;
    margin: 0 auto;
    height: 50px;
    line-height: 20px;
    text-align: center;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

#wp-sub-accounts-form button[type="submit"]:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#wp-sub-accounts-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

#wp-sub-accounts-form button[type="submit"]:hover:before {
    left: 100%;
}

#wp-sub-accounts-form button[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Full container loader styles */
#full-container-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.wpsa-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpsa-loader-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Circular loader styles */
.wpsa-circular-loader {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.wpsa-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: wpsa-spin 1s linear infinite;
}

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

/* Table container styles - matching form width */
.wpsa-table-container {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e8ed;
    box-sizing: border-box;
}

/* Ensure table content stays within bounds */
.wpsa-table-container * {
    box-sizing: border-box;
}

/* Table header section */
.wpsa-table-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 25px 30px;
    border-bottom: 3px solid #3498db;
}

.wpsa-table-header h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Optimized styles for the wp-sub-accounts table */
#wp-sub-accounts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell, sans-serif;
    table-layout: fixed;
    overflow: hidden;
}

#wp-sub-accounts-table, 
#wp-sub-accounts-table th, 
#wp-sub-accounts-table td {
    border: none;
}

#wp-sub-accounts-table th {
    text-align: left;
    padding: 20px 25px;
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e1e8ed;
    white-space: nowrap;
}

#wp-sub-accounts-table td {
    text-align: left;
    padding: 20px 25px;
    background-color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
}



#wp-sub-accounts-table tr:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Fixed column widths for proper alignment */
#wp-sub-accounts-table th:nth-child(1),
#wp-sub-accounts-table td:nth-child(1) {
    width: 16%;
    font-weight: 600;
    color: #2c3e50;
}

#wp-sub-accounts-table th:nth-child(2),
#wp-sub-accounts-table td:nth-child(2) {
    width: 20%;
    color: #7f8c8d;
}

#wp-sub-accounts-table th:nth-child(3),
#wp-sub-accounts-table td:nth-child(3) {
    width: 16%;
    color: #7f8c8d;
}

#wp-sub-accounts-table td:nth-child(4) {
    width: 25%;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#wp-sub-accounts-table th:nth-child(4) {
    width: 25%;
    color: #2c3e50;
}

#wp-sub-accounts-table th:nth-child(5),
#wp-sub-accounts-table td:nth-child(5) {
    width: 23%;
    text-align: center;
}

/* Enhanced button styles */
.wpsa-update-servers-btn,
.wpsa-delete-sub-account-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    min-width: 100px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.wpsa-update-servers-btn:hover,
.wpsa-delete-sub-account-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.wpsa-delete-sub-account-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.wpsa-delete-sub-account-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Update servers row styling */
.wpsa-update-servers-row td {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-top: 2px solid #dee2e6;
    text-align: center;
}

/* General button styles for wp-sub-accounts */
.wpsa-button {
    background: linear-gradient(135deg, #0073aa, #005885);
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.wpsa-button:hover {
    background: linear-gradient(135deg, #005885, #004466);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

/* Error and warning styles */
.wpsa-error {
    color: #e74c3c;
    margin-top: 12px;
    padding: 10px;
    background-color: #fdf2f2;
    border: 1px solid #fadbd8;
    border-radius: 4px;
    font-weight: 500;
}

.wpsa-warning-message {
    color: #e67e22;
    font-weight: 600;
    padding: 10px;
    background-color: #fef9e7;
    border: 1px solid #fdeaa7;
    border-radius: 4px;
}

/* Server selection styles */
.wpsa-servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.wpsa-server-item {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wpsa-server-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.wpsa-server-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.wpsa-server-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 4px;
    transform: scale(1.3);
    accent-color: #3498db;
}

.wpsa-server-info {
    flex: 1;
    line-height: 1.6;
}

.wpsa-server-info strong {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
}

#servers-selection-container {
    margin: 20px 0;
    min-height: 120px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#servers-selection-container p {
    margin: 0;
    padding: 30px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
}

/* Enhanced servers table styles */
.wpsa-servers-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.wpsa-servers-table th,
.wpsa-servers-table td {
    border: none;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.wpsa-servers-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpsa-servers-table td {
    background-color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.wpsa-servers-table input[type="checkbox"] {
    transform: scale(1.3);
    margin: 0;
    accent-color: #3498db;
}

.wpsa-servers-table tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    #wp-sub-accounts-form {
        max-width: 95%;
        padding: 20px;
    }
    
    .wpsa-table-container {
        width: 100%;
        max-width: 100%;
        margin: 20px 0;
        border-radius: 8px;
    }
    
    .wpsa-table-header {
        padding: 20px 25px;
    }
    
    .wpsa-table-header h2 {
        font-size: 18px;
    }
    
    #wp-sub-accounts-table {
        font-size: 12px;
        margin: 0;
    }
    
    #wp-sub-accounts-table th,
    #wp-sub-accounts-table td {
        padding: 15px 20px;
        font-size: 12px;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wpsa-update-servers-btn,
    .wpsa-delete-sub-account-btn {
        padding: 6px 10px;
        font-size: 10px;
        margin: 1px;
        min-width: 80px;
    }
    
    #wp-sub-accounts-form button[type="submit"] {
        min-width: 240px;
        padding: 12px 35px;
        font-size: 11px;
        height: 45px;
    }
    
    .wpsa-loader-content {
        padding: 40px;
        margin: 20px;
    }
    
    .wpsa-circular-loader {
        width: 60px;
        height: 60px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #wp-sub-accounts-form {
        max-width: 98%;
        padding: 15px;
    }
    
    .wpsa-table-container {
        width: 100%;
        max-width: 100%;
        margin: 20px 0;
        border-radius: 6px;
    }
    
    .wpsa-table-header {
        padding: 15px 20px;
    }
    
    .wpsa-table-header h2 {
        font-size: 16px;
    }
    
    #wp-sub-accounts-table th,
    #wp-sub-accounts-table td {
        padding: 12px 15px;
        font-size: 11px;
    }
    
    .wpsa-update-servers-btn,
    .wpsa-delete-sub-account-btn {
        padding: 5px 8px;
        font-size: 9px;
        min-width: 70px;
        margin: 1px;
    }
    
    #wp-sub-accounts-form button[type="submit"] {
        min-width: 200px;
        padding: 10px 30px;
        font-size: 10px;
        height: 40px;
    }
}

/* Result message styling */
#wp-sub-accounts-result {
    margin-top: 20px;
}

#wp-sub-accounts-result .wpsa-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-top: 10px;
}

#wp-sub-accounts-result .wpsa-success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-top: 10px;
}