/* Utility Server CDN Manager - Admin Styles */

/* General Layout */
.uscdn-settings,
.uscdn-analytics,
.uscdn-tools {
    max-width: 1200px;
}

.uscdn-settings h1,
.uscdn-analytics h1,
.uscdn-tools h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.uscdn-settings h1 .dashicons,
.uscdn-analytics h1 .dashicons,
.uscdn-tools h1 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #2271b1;
}

.uscdn-version {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    background: #f0f0f1;
    padding: 4px 12px;
    border-radius: 4px;
    margin-left: auto;
}

/* Plugin Branding */
.uscdn-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px 30px;
    background: linear-gradient(90deg, #ffffff 0%, #f0f0f5 15%, #667eea 50%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.uscdn-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, transparent 20%);
    pointer-events: none;
}

.uscdn-branding-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.uscdn-branding-logos a {
    display: inline-block;
    text-decoration: none;
}

.uscdn-branding-logo-main {
    height: 55px;
    width: auto;
    filter: none;
    transition: transform 0.3s ease;
}

.uscdn-branding-logos a:hover .uscdn-branding-logo-main {
    transform: scale(1.05);
}

.uscdn-branding-divider {
    width: 2px;
    height: 50px;
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.3) 0%, 
        rgba(102, 126, 234, 0.8) 50%, 
        rgba(102, 126, 234, 0.3) 100%
    );
}

.uscdn-branding-sub-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uscdn-branding-logo-sub {
    height: 40px;
    width: auto;
    opacity: 0.95;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.uscdn-branding-sub-logos a:hover .uscdn-branding-logo-sub {
    opacity: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.uscdn-branding-info {
    margin-left: auto;
    text-align: right;
    position: relative;
    z-index: 1;
}

.uscdn-branding-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.uscdn-branding-subtitle {
    font-size: 13px;
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}


/* Tabs */
.uscdn-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    border-bottom: 2px solid #dcdcde;
}

.uscdn-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #50575e;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.uscdn-tab:hover {
    color: #2271b1;
}

.uscdn-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.uscdn-tab-content {
    display: none;
    background: #fff;
    padding: 30px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.uscdn-tab-content.active {
    display: block;
}

/* Sections */
.uscdn-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #dcdcde;
}

.uscdn-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.uscdn-section h2 {
    margin-top: 0;
    color: #1d2327;
    font-size: 18px;
}

.uscdn-section h3 {
    color: #2271b1;
    font-size: 16px;
    margin-top: 0;
}

/* Toggle Switch */
.uscdn-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.uscdn-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.uscdn-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dcdcde;
    transition: 0.3s;
    border-radius: 26px;
}

.uscdn-toggle .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.uscdn-toggle input:checked + .slider {
    background-color: #2271b1;
}

.uscdn-toggle input:checked + .slider:before {
    transform: translateX(24px);
}

/* Cards */
.uscdn-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.uscdn-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.uscdn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.uscdn-card-icon {
    font-size: 48px;
    color: #2271b1;
    line-height: 1;
}

.uscdn-card-icon .dashicons {
    width: 48px;
    height: 48px;
    font-size: 48px;
}

.uscdn-card-content h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1;
}

.uscdn-card-content p {
    margin: 8px 0 0;
    color: #646970;
    font-size: 14px;
}

/* Empty State */
.uscdn-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.uscdn-empty-state .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #dcdcde;
    margin-bottom: 16px;
}

.uscdn-empty-state p {
    margin: 0;
    font-size: 16px;
}

/* Tips */
.uscdn-tips {
    display: grid;
    gap: 12px;
}

.uscdn-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f6f7f7;
    border-radius: 4px;
}

.uscdn-tip .dashicons {
    color: #00a32a;
    flex-shrink: 0;
    margin-top: 2px;
}

.uscdn-tip p {
    margin: 0;
    color: #1d2327;
}

/* Test Tool */
.uscdn-test-tool {
    display: grid;
    gap: 20px;
}

.uscdn-test-item {
    padding: 20px;
    background: #f6f7f7;
    border-radius: 4px;
}

.uscdn-test-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.uscdn-test-item code {
    display: block;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin-bottom: 12px;
    word-break: break-all;
}

.uscdn-test-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.uscdn-test-result.success {
    display: block;
    background: #d5f2e3;
    color: #00693e;
    border: 1px solid #00a32a;
}

.uscdn-test-result.error {
    display: block;
    background: #f8d7da;
    color: #8c1c13;
    border: 1px solid #d63638;
}

.uscdn-test-result.loading {
    display: block;
    background: #f0f6fc;
    color: #0c5d97;
    border: 1px solid #2271b1;
}

/* Cache Info */
.uscdn-cache-info {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
}

.uscdn-cache-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
}

.uscdn-cache-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.uscdn-cache-stats .stat .dashicons {
    color: #2271b1;
}

/* Form Overrides */
.uscdn-form .form-table th {
    width: 250px;
}

.uscdn-form .regular-text {
    width: 100%;
    max-width: 500px;
}

.uscdn-form .large-text {
    width: 100%;
    max-width: 600px;
}

/* Buttons */
.button-large {
    padding: 8px 24px !important;
    height: auto !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .uscdn-cards {
        grid-template-columns: 1fr;
    }
    
    .uscdn-cache-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .uscdn-tabs {
        overflow-x: auto;
    }
}
