/**
 * Ezy AI Admin Styles
 * Premium Dark Glassmorphism Design
 */

/* Import Montserrat Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* =====================================================
   Global Background & Base Styles
   ===================================================== */

/* Connection Page Background */
body.toplevel_page_ezy-ai-connection {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.toplevel_page_ezy-ai-connection #wpcontent {
    background-image: url('../images/background.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: #062828 !important;
    padding-left: 0 !important;
}

body.toplevel_page_ezy-ai-connection #wpbody-content {
    background: transparent !important;
    padding-bottom: 0 !important;
}

body.toplevel_page_ezy-ai-connection #wpbody {
    background: transparent !important;
}

body.toplevel_page_ezy-ai-connection #adminmenuback,
body.toplevel_page_ezy-ai-connection #adminmenuwrap {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* =====================================================
   Legacy Admin Styles (for other pages)
   ===================================================== */

/* Main Container */
.ezy-ai-admin {
    padding: 20px 20px 40px;
    max-width: 1400px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Title Styles */
.ezy-ai-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 32px;
    margin: 0 0 10px;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ezy-ai-title .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #f16001;
}

.ezy-ai-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 30px;
    font-weight: 400;
}

/* Grid Layout */
.ezy-ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Card Component - Glassmorphism */
.ezy-ai-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.ezy-ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 16px;
    pointer-events: none;
}

.ezy-ai-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.ezy-ai-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.ezy-ai-card-wide {
    grid-column: 1 / -1;
}

.ezy-ai-card-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;
}

.ezy-ai-card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ezy-ai-card-header h2 .dashicons {
    color: #f16001;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.ezy-ai-card-body {
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Stats Display */
.ezy-ai-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.ezy-ai-stat-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ezy-ai-stat-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.ezy-ai-stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #f16001;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(241, 96, 1, 0.3);
}

.ezy-ai-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Status Indicators */
.ezy-ai-status-active {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.ezy-ai-status-inactive {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.ezy-ai-status-success {
    color: #10b981;
    font-size: 20px;
    font-weight: bold;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.ezy-ai-status-error {
    color: #ef4444;
    font-size: 20px;
    font-weight: bold;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}

.ezy-ai-status-warning {
    color: #f59e0b;
    font-size: 20px;
    font-weight: bold;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

/* Actions */
.ezy-ai-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ezy-ai-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ezy-ai-actions .button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ezy-ai-actions .button-primary {
    background: rgba(241, 96, 1, 0.9) !important;
    border-color: rgba(241, 96, 1, 1) !important;
}

.ezy-ai-actions .button-primary:hover {
    background: rgba(241, 96, 1, 1) !important;
    box-shadow: 0 6px 20px rgba(241, 96, 1, 0.4);
}

.ezy-ai-actions .button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Table Styles */
.ezy-ai-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ezy-ai-table thead th {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 14px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ezy-ai-table thead th:first-child {
    border-top-left-radius: 8px;
}

.ezy-ai-table thead th:last-child {
    border-top-right-radius: 8px;
}

.ezy-ai-table tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.ezy-ai-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ezy-ai-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.ezy-ai-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

.ezy-ai-empty-state {
    text-align: center;
    padding: 60px 20px !important;
    color: rgba(255, 255, 255, 0.6);
}

.ezy-ai-empty-state .dashicons {
    font-size: 56px;
    width: 56px;
    height: 56px;
    opacity: 0.3;
    display: block;
    margin: 0 auto 16px;
    color: rgba(255, 255, 255, 0.5);
}

/* Info List */
.ezy-ai-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ezy-ai-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ezy-ai-info-list li:last-child {
    border-bottom: none;
}

.ezy-ai-info-list strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.ezy-ai-info-list span {
    color: rgba(255, 255, 255, 0.7);
}

.ezy-ai-info-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.ezy-ai-info-item:last-child {
    border-bottom: none;
}

.ezy-ai-info-item strong {
    color: #ffffff;
    font-weight: 600;
}

.ezy-ai-info-item span {
    color: #ffffff;
}

/* Chart Placeholder */
.ezy-ai-chart-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.ezy-ai-chart-placeholder .dashicons {
    font-size: 72px;
    width: 72px;
    height: 72px;
    opacity: 0.3;
    display: block;
    margin: 0 auto 20px;
    color: rgba(255, 255, 255, 0.4);
}

/* Resource List */
.ezy-ai-resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ezy-ai-resource-link {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.ezy-ai-resource-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.ezy-ai-resource-link .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #f16001;
    flex-shrink: 0;
    margin-top: 2px;
}

.ezy-ai-resource-link strong {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
}

.ezy-ai-resource-link p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.5;
}

/* Contact Methods */
.ezy-ai-contact-methods {
    margin: 20px 0;
}

.ezy-ai-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.ezy-ai-contact-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.ezy-ai-contact-item .dashicons {
    font-size: 26px;
    width: 26px;
    height: 26px;
    color: #f16001;
    flex-shrink: 0;
}

.ezy-ai-contact-item strong {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
}

.ezy-ai-contact-item p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.ezy-ai-contact-item a {
    color: #f16001;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ezy-ai-contact-item a:hover {
    color: #ff7b1c;
    text-shadow: 0 0 10px rgba(241, 96, 1, 0.5);
}

/* Tips List */
.ezy-ai-tips-list {
    margin: 0;
    padding-left: 24px;
}

.ezy-ai-tips-list li {
    margin-bottom: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.ezy-ai-tips-list li::marker {
    color: #f16001;
}

/* Button Enhancements */
.ezy-ai-admin .button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ezy-ai-admin .button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ezy-ai-admin .button-primary {
    background: rgba(241, 96, 1, 0.9) !important;
    border-color: rgba(241, 96, 1, 1) !important;
}

.ezy-ai-admin .button-primary:hover {
    background: rgba(241, 96, 1, 1) !important;
    box-shadow: 0 6px 20px rgba(241, 96, 1, 0.4) !important;
}

.ezy-ai-admin .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Form Table Overrides */
.ezy-ai-admin .form-table {
    background: transparent;
}

.ezy-ai-admin .form-table th {
    padding: 20px 10px 20px 0;
    width: 200px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.ezy-ai-admin .form-table td {
    padding: 20px 10px;
}

.ezy-ai-admin .form-table input[type="text"],
.ezy-ai-admin .form-table input[type="password"],
.ezy-ai-admin .form-table input[type="url"],
.ezy-ai-admin .form-table textarea {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.ezy-ai-admin .form-table input[type="text"]::placeholder,
.ezy-ai-admin .form-table input[type="password"]::placeholder,
.ezy-ai-admin .form-table input[type="url"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ezy-ai-admin .form-table input[type="text"]:focus,
.ezy-ai-admin .form-table input[type="password"]:focus,
.ezy-ai-admin .form-table input[type="url"]:focus,
.ezy-ai-admin .form-table textarea:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(241, 96, 1, 0.6);
    box-shadow: 0 0 0 2px rgba(241, 96, 1, 0.2);
}

.ezy-ai-admin .form-table .description {
    color: rgba(255, 255, 255, 0.6);
}

.ezy-ai-admin .form-table .description a {
    color: #f16001;
    text-decoration: none;
}

.ezy-ai-admin .form-table .description a:hover {
    color: #ff7b1c;
    text-decoration: underline;
}

/* Notices */
.ezy-ai-admin .notice {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-left: 4px solid;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
}

.ezy-ai-admin .notice-success {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.ezy-ai-admin .notice-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.ezy-ai-admin .notice-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Connection Page Specific - All Text White */
body.toplevel_page_ezy-ai-connection .ezy-ai-admin,
body.toplevel_page_ezy-ai-connection .ezy-ai-card,
body.toplevel_page_ezy-ai-connection .ezy-ai-card-body,
body.toplevel_page_ezy-ai-connection .ezy-ai-card-header {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-info-item,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-item strong,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-item span {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-info-list p,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-list li,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-list ul li {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-capability-item,
body.toplevel_page_ezy-ai-connection .ezy-ai-capability-item span {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-empty-state,
body.toplevel_page_ezy-ai-connection .ezy-ai-empty-state p {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-status-warning {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .ezy-ai-info-box,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-box h4,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-box ol,
body.toplevel_page_ezy-ai-connection .ezy-ai-info-box li {
    color: #ffffff !important;
}

body.toplevel_page_ezy-ai-connection .notice,
body.toplevel_page_ezy-ai-connection .notice p {
    color: #ffffff !important;
}

/* Ensure all paragraphs and text elements are white */
body.toplevel_page_ezy-ai-connection p,
body.toplevel_page_ezy-ai-connection span:not(.ezy-ai-status-success):not(.ezy-ai-status-error):not(.ezy-ai-status-warning):not(.ezy-ai-status-inactive),
body.toplevel_page_ezy-ai-connection div:not(.ezy-ai-auth-code),
body.toplevel_page_ezy-ai-connection h1,
body.toplevel_page_ezy-ai-connection h2,
body.toplevel_page_ezy-ai-connection h3,
body.toplevel_page_ezy-ai-connection h4,
body.toplevel_page_ezy-ai-connection h5,
body.toplevel_page_ezy-ai-connection h6 {
    color: #ffffff !important;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .ezy-ai-grid {
        grid-template-columns: 1fr;
    }
    
    .ezy-ai-stats {
        grid-template-columns: 1fr;
    }
    
    .ezy-ai-actions .button {
        width: 100%;
    }
    
    .ezy-ai-title {
        font-size: 24px;
    }
    
    .ezy-ai-card {
        border-radius: 12px;
    }
}
