﻿
/* ==========================================
           GLOBAL STYLES (Applies to all screens)
           ========================================== */
/* Custom Button Styles (Restored to exact original rules) */
.btn-signup {
    padding: 10px 20px;
    font-size: 13px;
    min-width: 90px;
    border-radius: 8px;
    border: 1px solid #08284E !important;
    color: #ffffff !important;
    font-weight: 500;
    background-color: #08284E !important;
}

.btn-signup:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #08284E !important;
}

/* Article & Title Styling */
.article-editor-canvas {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 40px 50px;
    min-height: 600px;
}

.form-control-title {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: #2D2B42;
    padding-left: 0;
}

    .form-control-title::placeholder {
        font-size: 36px !important;
        font-weight: 400;
        opacity: 0.6;
        color: #A7A5BF;
    }

.section-heading {
    font-size: 15px;
    font-weight: 600;
    color: #08284E;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Summernote Base Styling */
.note-editor.note-frame {
    position: relative !important;
    border-color: #A7A5BF !important;
    border-radius: 8px;
    margin-bottom: 8px !important;
    width: 100% !important;
    display: block !important;
}

.note-editor .note-placeholder {
    font-size: 18px !important;
    line-height: 1.4 !important;
}

.note-editor .note-editable {
    padding: 0 !important;
    font-size: 20px;
    line-height: 1.2;
    color: #333333;
    min-height: 350px;
}

/* Sticky Toolbar */
.note-toolbar {
    position: sticky;
    top: 10px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid #E0DFEC !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.note-btn {
    background: transparent !important;
    border: none !important;
    color: #08284E !important;
    font-size: 14px !important;
    border-radius: 6px !important;
}

    .note-btn:hover {
        background-color: #EEEDF7 !important;
    }

/* Word Count Badge */
.note-editor #wordCountBadge,
#wordCountBadge {
    position: absolute;
    bottom: 8px;
    right: 12px;
    z-index: 10;
    font-size: 11px;
    padding: 4px 8px;
    opacity: 0.85;
    pointer-events: none;
}

/* Search Component Base Styles (Applies everywhere, including Desktop) */
.component-3 {
    background-color: #ffffff !important;
    width: 100%; /* Expands full width to match Snippet 1 */
    max-width: 100%; /* Overrides previous 500px restriction */
    margin: 0 auto 30px auto; /* Adds 30px bottom margin for spacing */
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.search-input {
    width: 100%;
    font-size: 1rem;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

    .search-input::placeholder {
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        opacity: 0.7;
    }
/* Modern Pulse/Blink Animation for Incomplete Fields */
@keyframes brandPulse {
    0% {
        border-color: #08284E !important;
        box-shadow: 0 0 0 0 rgba(64, 59, 116, 0.7);
    }

    50% {
        border-color: #08284E !important;
        box-shadow: 0 0 0 6px rgba(64, 59, 116, 0.25);
    }

    100% {
        border-color: #08284E !important;
        box-shadow: 0 0 0 0 rgba(64, 59, 116, 0.7);
    }
}

.field-error {
    animation: brandPulse 1.2s infinite ease-in-out !important;
    border-radius: 8px !important;
}

/* Optional: Subtle shake effect on initial trigger */
@keyframes softShake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-4px);
    }

    40%, 80% {
        transform: translateX(4px);
    }
}

.field-shake {
    animation: softShake 0.4s ease-in-out, brandPulse 1.2s infinite ease-in-out 0.4s !important;
}
/* Placeholder flashing keyframes */
@keyframes placeholderPulse {
    0%, 100% {
        opacity: 0.2;
        color: #08284E;
    }

    50% {
        opacity: 1;
        color: #08284E;
        font-weight: 700;
    }
}

/* Explicit vendor rules to trigger the text flash when empty on validation error */
.form-control-title.field-error::-webkit-input-placeholder,
.form-control-title.field-shake::-webkit-input-placeholder {
    animation: placeholderPulse 1.2s infinite ease-in-out !important;
}

.form-control-title.field-error::-moz-placeholder,
.form-control-title.field-shake::-moz-placeholder {
    animation: placeholderPulse 1.2s infinite ease-in-out !important;
}

.form-control-title.field-error:-ms-input-placeholder,
.form-control-title.field-shake:-ms-input-placeholder {
    animation: placeholderPulse 1.2s infinite ease-in-out !important;
}

.form-control-title.field-error::placeholder,
.form-control-title.field-shake::placeholder {
    animation: placeholderPulse 1.2s infinite ease-in-out !important;
}
/* ==========================================
           COMBINED MOBILE ADJUSTMENTS (<= 575.98px)
           ========================================== */
@media (max-width: 575.98px) {
    /* Canvas & Title Mobile Scaling */
    .article-editor-canvas {
        padding: 20px 12px !important;
        min-height: auto !important;
    }

    .form-control-title {
        font-size: 24px !important;
    }

        .form-control-title::placeholder {
            font-size: 24px !important;
        }
    /* Summernote Horizontal Scrollable Toolbar for Mobile */
    .note-toolbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
        top: 0px !important;
        padding: 4px 8px !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

        .note-toolbar::-webkit-scrollbar {
            display: none;
        }

    .note-btn-group {
        flex: 0 0 auto !important;
    }
    /* Summernote Editable Area Enhancements */
    .note-editor .note-editable {
        font-size: 15px !important;
        line-height: 1.4 !important;
        min-height: 250px !important;
    }

        .note-editor .note-editable img {
            max-width: 100% !important;
            height: auto !important;
            object-fit: contain;
        }
    /* Header & Search Bar Mobile Responsive Styles */
    .search-input {
        font-size: 16px !important; /* Prevents iOS Safari focus auto-zoom */
    }

    .component-3 {
        width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 20px !important;
    }

    .explore-topic-bg {
        padding-bottom: 20px !important;
    }

        .explore-topic-bg .d-flex {
            min-height: 160px !important;
        }
}


