/* CSP-safe utility classes - replace inline styles */

/* Display utilities - used by CSP-safe JavaScript helpers */
.display-none {
    display: none !important;
}

.display-block {
    display: block;
}

.display-flex {
    display: flex;
}

.display-grid {
    display: grid;
}

.menu-title-hidden {
    display: none;
}

.menu-compact-header {
    padding: 8px 12px;
    font-size: 0.9em;
}

.menu-compact-item {
    padding: 6px 12px 6px 20px;
    font-size: 0.85em;
}

/* Form utilities */
.form-label-small {
    font-size: 0.9em;
}

.form-input-compact {
    padding: 8px 10px;
    font-size: 14px;
}

.submit-btn-full-width {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
}

.button-compact {
    padding: 10px 8px;
    font-size: 13px;
    min-width: 100%;
}

/* Link utilities */
.logout-link {
    color: inherit;
    text-decoration: none;
}

.submit-btn-inline {
    display: inline-block;
}

/* Text utilities */
.telegram-note {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.text-center {
    text-align: center;
}

.margin-top-20 {
    margin-top: 20px;
}

/* Auth page utilities */
.auth-links-center {
    text-align: center;
    margin-top: 20px;
}

/* Highlight box */
.highlight-box {
    margin-top: 20px;
}

/* SEO Dashboard utilities */
.traffic-chart {
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 20px;
}

.chart-bar {
    width: 40px;
    border-radius: 4px;
}

.chart-bar-light {
    background: rgba(255, 255, 255, 0.3);
    height: 60px;
}

.chart-bar-light-2 {
    background: rgba(255, 255, 255, 0.3);
    height: 80px;
}

.chart-bar-light-3 {
    background: rgba(255, 255, 255, 0.3);
    height: 90px;
}

.chart-bar-light-4 {
    background: rgba(255, 255, 255, 0.3);
    height: 120px;
}

.chart-bar-light-5 {
    background: rgba(255, 255, 255, 0.3);
    height: 140px;
}

.chart-bar-light-6 {
    background: rgba(255, 255, 255, 0.3);
    height: 170px;
}

.chart-bar-highlight {
    background: #4CAF50;
    height: 200px;
}

.chart-note {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.status-ok {
    color: #4CAF50;
    font-weight: bold;
}

.status-note {
    color: #666;
    margin-top: 10px;
}

/* Badges */
.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

/* Content sections */
.full-width {
    width: 100%;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.grid-full {
    display: grid;
    gap: 10px;
}

.card-gradient-purple {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.card-gradient-pink {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.card-content-box {
    padding: 10px;
    background: #f5f7fa;
    border-radius: 8px;
}

.card-title {
    font-size: 2rem;
    font-weight: bold;
}

.card-subtitle {
    font-size: 0.9rem;
}

.card-section-title {
    margin-top: 20px;
}

.list-no-style {
    list-style: none;
    padding: 0;
}

.list-item-spaced {
    padding: 8px 0;
}

/* Telegram forecast */
.telegram-forecast-actions {
    margin-top: 20px;
}

/* Links */
.link-primary {
    color: var(--primary-color);
}

.link-primary-styled {
    color: #667eea;
    font-weight: 600;
}

/* SVG Circle progress */
.circle-progress {
    stroke-dashoffset: calc(565.48 * (1 - 0.82));
}

/* Keyword badges */
.keyword-badge-spaced {
    margin-top: 4px;
}

/* Message notification styles */
.notification-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
    animation: slideIn 0.4s ease;
}

@media (max-width: 768px) {
    .notification-message {
        top: max(12px, env(safe-area-inset-top, 0));
        left: 12px;
        right: 12px;
        margin: 0 auto;
        max-width: none;
        width: calc(100% - 24px);
        padding: 12px 16px;
        font-size: 14px;
    }
}

.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #f44336;
}

.notification-warning {
    background-color: #ffc107;
    color: #333;
}

.notification-info {
    background-color: #2196F3;
}

/* Loading indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Modal and form display utilities */
.modal-hidden {
    display: none !important;
}

.modal-visible {
    display: block !important;
}

/* Chat message modal */
.chat-message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.chat-message-modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.chat-message-content {
    margin-top: 20px;
}

/* Preformatted text */
.preformatted-text {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Error message paragraph */
.error-message {
    color: red;
}

/* Status info warning box */
.status-box-warning {
    padding: 15px;
    background: #fff3cd;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Status info success box */
.status-box-success {
    padding: 15px;
    background: #d4edda;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Status info info box */
.status-box-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Telegram link */
.telegram-link {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Loading indicator text small */
.loading-text-small {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Animation utilities */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Autocomplete dropdown utilities */
.autocomplete-placeholder {
    color: #666;
    text-align: center;
    padding: 10px;
}

.autocomplete-loading {
    color: #666;
    text-align: center;
    padding: 10px;
}

.autocomplete-error {
    color: #dc3545;
    text-align: center;
    padding: 10px;
}

.autocomplete-item-flex {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.autocomplete-item-name {
    display: block;
}

.autocomplete-item-name strong {
    font-weight: bold;
}

.autocomplete-item-timezone {
    color: #666;
    font-size: 0.85em;
}

.autocomplete-profile-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.autocomplete-profile-info {
    display: block;
}

.autocomplete-profile-name strong {
    font-weight: bold;
}

.autocomplete-profile-default {
    color: #4CAF50;
    margin-left: 8px;
}

.autocomplete-profile-details {
    color: #666;
    font-size: 0.9em;
}

/* Border color utilities for validation */
.border-success {
    border-color: #48bb78 !important;
}

.border-error {
    border-color: #dc3545 !important;
}

.border-warning {
    border-color: #ffc107 !important;
}

.border-focus {
    border-color: #4299e1 !important;
}

.border-default {
    border-color: #e2e8f0 !important;
}

/* Height utilities */
.height-auto {
    height: auto !important;
}

.height-0 {
    height: 0 !important;
}

.max-height-0 {
    max-height: 0 !important;
}

.max-height-none {
    max-height: none !important;
}

/* Padding utilities */
.padding-0 {
    padding: 0 !important;
}

.padding-10 {
    padding: 10px !important;
}

/* Opacity utilities */
.opacity-0 {
    opacity: 0;
}

.opacity-1 {
    opacity: 1;
}

/* Transform utilities */
.transform-translate-y-0 {
    transform: translateY(0);
}

.transform-translate-y-30 {
    transform: translateY(30px);
}

/* Transition utilities */
.transition-opacity-transform {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Accordion animation utilities */
.accordion-collapsed {
    max-height: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-expanded {
    max-height: none !important;
    padding: 10px !important;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Width utilities */
.width-100 {
    width: 100% !important;
}

/* Font size utilities */
.font-size-14 {
    font-size: 14px !important;
}

.font-size-13 {
    font-size: 13px !important;
}

.font-size-09em {
    font-size: 0.9em !important;
}

.font-size-085em {
    font-size: 0.85em !important;
}

/* Min width utilities */
.min-width-100 {
    min-width: 100% !important;
}

/* Autocomplete dropdown display fix */
.autocomplete-dropdown {
    display: none !important;
}

.autocomplete-dropdown:not(.display-none) {
    display: block !important;
}
