/**
 * TAICS Header Module - FIXED No Duplicate Icons
 * 
 * @package TAICS_Content_Assistant
 * @version 2.0.0
 */

/* COMPLETE RESET - NO WordPress interference */
.taics-header-main,
.taics-header,
.taics-header *,
.taics-header *::before,
.taics-header *::after {
    all: unset !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* MAIN HEADER CONTAINER - NO MARGINS */
.taics-header-main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    overflow: hidden !important;
    position: relative !important;
}

/* EXACT DASHBOARD CONTENT ALIGNMENT */
.taics-header {
    width: calc(100% - 40px) !important; /* Exact same as dashboard content */
    margin: 0 20px !important; /* Exact same as dashboard content */
    padding: 20px 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: transparent !important;
    color: white !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    min-height: 80px !important;
    position: relative !important;
}

/* LEFT SECTION - TIGHT LAYOUT */
.taics-header-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important; /* Minimal gap */
    flex: 1 !important;
    color: white !important;
}

.taics-header-top-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
}

/* FIXED: Only style Unicode emoji, no CSS-generated icons */
.taics-header-icon {
    font-size: 2.2em !important;
    color: white !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.taics-header-component-name {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: white !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

/* ORIGINAL SUBTITLE - keeping for compatibility */
.taics-header-subtitle {
    font-size: 0.7rem !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1 !important;
    margin-top: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 400px !important;
    display: block !important;
}

.taics-header-subtitle a {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    display: inline !important;
}

.taics-header-subtitle a:hover {
    color: white !important;
    text-decoration: underline !important;
}

/* IMPROVED SUBTITLE - larger and with styled link */
.taics-header-subtitle-improved {
    font-size: 0.8rem !important; /* Increased from 0.7rem */
    font-weight: 400 !important; /* Increased from 300 */
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.2 !important;
    margin-top: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 450px !important; /* Increased from 400px */
    display: block !important;
}

.taics-technodrome-link {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    font-weight: 500 !important; /* Slightly bold */
    transition: all 0.3s ease !important;
    border-bottom: 1px solid transparent !important;
    white-space: nowrap !important;
    display: inline !important;
}

.taics-technodrome-link:hover {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
}

/* RIGHT SECTION - ABSOLUTE POSITIONING */
.taics-header-right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* ORIGINAL USER INFO - keeping for compatibility */
.taics-header-user-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: white !important;
    margin-right: 15px !important;
}

.taics-header-user-name {
    font-size: 14px !important;
    font-weight: 600 !important;
}

.taics-header-version {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* IMPROVED USER INFO - single row layout */
.taics-header-user-info-improved {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: white !important;
    margin-right: 15px !important;
    white-space: nowrap !important;
}

.taics-header-user-name-large {
    font-size: 15px !important; /* Increased from 14px */
    font-weight: 600 !important;
    color: white !important;
    white-space: nowrap !important;
}

.taics-header-version-large {
    font-size: 12px !important; /* Increased from 11px */
    padding: 5px 12px !important; /* Increased padding */
    border-radius: 12px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* PLAN BADGES - unified for both old and new versions */
.taics-header-version.taics-plan-free,
.taics-header-version-large.taics-plan-free {
    background: #28a745 !important;
    color: white !important;
}

.taics-header-version.taics-plan-pro,
.taics-header-version-large.taics-plan-pro {
    background: #007bff !important;
    color: white !important;
}

.taics-header-version.taics-plan-premium,
.taics-header-version-large.taics-plan-premium {
    background: #fd7e14 !important;
    color: white !important;
}

/* LICENSE FIELDS */
.taics-header-license-fields {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

.taics-header-license-input {
    width: 180px !important;
    height: 38px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    font-family: 'Segoe UI', sans-serif !important;
}

.taics-header-license-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.taics-header-license-input:focus {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    outline: none !important;
}

/* FIXED: License button uses Unicode emoji from HTML, no CSS-generated icon */
.taics-header-license-btn {
    width: 42px !important;
    height: 38px !important;
    padding: 10px !important;
    font-size: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.taics-header-license-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

.taics-contact-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.taics-contact-btn:hover {
    color: #7fffd4 !important;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .taics-header {
        margin: 0 15px !important;
        width: calc(100% - 30px) !important;
    }
}

@media (max-width: 1024px) {
    .taics-header {
        flex-direction: column !important;
        gap: 15px !important;
        margin: 0 15px !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .taics-header-left {
        width: 100% !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .taics-header-right {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    
    .taics-header-license-fields {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .taics-header-user-info,
    .taics-header-user-info-improved {
        align-items: center !important;
        margin-right: 0 !important;
    }
    
    .taics-header-user-info-improved {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .taics-header-subtitle,
    .taics-header-subtitle-improved {
        white-space: normal !important;
        max-width: none !important;
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    .taics-header-component-name {
        font-size: 1.4rem !important;
    }
    
    .taics-header-subtitle,
    .taics-header-subtitle-improved {
        font-size: 0.65rem !important;
    }
    
    .taics-header-license-input {
        width: 150px !important;
        font-size: 12px !important;
    }
    
    .taics-header-user-name-large {
        font-size: 14px !important;
    }
    
    .taics-header-version-large {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
}

@media (max-width: 480px) {
    .taics-header-subtitle,
    .taics-header-subtitle-improved {
        font-size: 0.6rem !important;
        line-height: 1.2 !important;
    }
    
    .taics-header-license-fields {
        gap: 5px !important;
    }
    
    .taics-header-license-input {
        width: 120px !important;
    }
}