/*
Theme Name:        Smart CRM Dialer
Theme URI:         https://github.com/yourorg/smart-crm-dialer
Author:            Smart CRM
Author URI:        https://smartcrm.io
Description:       Official companion theme for the Smart CRM Dialer plugin. Provides a full-screen, glassmorphism CRM experience replacing the standard WordPress frontend. Install the Smart CRM Dialer plugin first, then activate this theme.
Version:           2.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License:           MIT
License URI:       https://opensource.org/licenses/MIT
Text Domain:       smart-crm-theme
Tags:              crm, dialer, dark, full-width, custom-background, custom-logo
*/

/* =====================================================================
   THEME BASE — All CRM styles are loaded by the plugin.
   This file only handles WordPress integration overrides.
   ===================================================================== */

/* Hide all standard WP frontend elements */
#wpadminbar                { display: none !important; }
html                       { margin-top: 0 !important; }
body.wp-admin #wpadminbar  { display: block !important; }

/* Full-screen CRM wrapper */
body.scrm-fullscreen {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #070b12;
}

body.scrm-fullscreen #scrm-root {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
}

/* Login page styling */
body.login {
    background: #070b12 !important;
}
body.login #login h1 a {
    background-image: none !important;
    font-size: 28px;
    text-indent: 0;
    width: auto;
    height: auto;
    color: #a78bfa;
    font-family: sans-serif;
    font-weight: 800;
}
body.login #login h1 a::before { content: "📞 SmartCRM"; }
body.login form {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6) !important;
}
body.login .input {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #e2e8f0 !important;
    border-radius: 8px !important;
}
body.login #wp-submit {
    background: linear-gradient(135deg, #6c63ff, #a78bfa) !important;
    border-color: transparent !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(108,99,255,0.4) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}
body.login #nav a, body.login #backtoblog a {
    color: #94a3b8 !important;
}

/* Loading screen */
#scrm-theme-loader {
    position: fixed;
    inset: 0;
    background: #070b12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 99999;
    transition: opacity 0.5s ease;
}
#scrm-theme-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.scrm-loader-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
.scrm-loader-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 32px rgba(108,99,255,0.5);
    animation: loaderPulse 2s ease-in-out infinite;
}
@keyframes loaderPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(108,99,255,0.5); }
    50%       { box-shadow: 0 8px 48px rgba(108,99,255,0.8); }
}
.scrm-loader-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.scrm-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scrm-loader-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.5px;
}

/* Not configured state */
#scrm-not-configured {
    position: fixed;
    inset: 0;
    background: #070b12;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scrm-config-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 48px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
}
.scrm-config-card h2 {
    font-size: 24px;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 12px;
}
.scrm-config-card p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 28px;
}
.scrm-config-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    color: #fff !important;
    text-decoration: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(108,99,255,0.4);
    transition: opacity 0.2s, transform 0.2s;
}
.scrm-config-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    text-decoration: none !important;
}
