/* This file is part of Moodle - http://moodle.org/
 *
 * Moodle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Moodle is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 */

/* Floating bubble shell. All rules are scoped under .local-cci so they
   do not bleed into other plugins or theme styles. */
.local-cci {
    position: fixed;
    z-index: 1000;        /* Below Bootstrap modals (1055) and nav drawer (1050). */
    max-width: calc(100vw - 2rem);
    font-family: inherit;
}

.local-cci--bottomright {
    right: 1rem;
    bottom: 1rem;
}

.local-cci--bottomleft {
    left: 1rem;
    bottom: 1rem;
}

.local-cci[hidden] {
    display: none;
}

.local-cci-toggle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #0076b5;     /* LinkedIn blue. */
    background: #0076b5;
    color: #0076b5;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.local-cci-toggle:hover,
.local-cci-toggle:focus {
    background: #0076b5;
    color: #0076b5;
    transform: translateY(-10px);
    outline: none;
}

.local-cci-toggle:focus-visible {
    outline: 3px solid #ffd24d;     /* High-contrast focus ring. */
    outline-offset: 2px;
}

.local-cci-toggle-icon {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.local-cci-panel {
    margin-top: 0.5rem;
    background: #fff;
    color: #1d1d1d;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    width: min(360px, 92vw);
    max-height: 70vh;
    overflow: auto;
}

.local-cci--bottomleft .local-cci-panel {
    margin-left: 0;
}

.local-cci-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.local-cci-body {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #4a4a4a;
}

.local-cci-noorg {
    margin: 0 0 0.75rem 0;
    padding: 0.5rem 0.75rem;
    background: #fff4e0;
    border: 1px solid #f0b400;
    border-radius: 4px;
    font-size: 0.85rem;
}

.local-cci-list {
    list-style: none;
    margin: 0 0 0.75rem 0;
    padding: 0;
}

.local-cci-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.local-cci-row:last-child {
    border-bottom: 0;
}

.local-cci-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.local-cci-issued {
    font-size: 0.8rem;
    color: #6a6a6a;
}

.local-cci-add {
    align-self: flex-start;
    margin-top: 0.25rem;
}

.local-cci-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.local-cci-hide {
    background: transparent;
    border: 0;
    color: #6a6a6a;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

.local-cci-hide:hover,
.local-cci-hide:focus {
    text-decoration: underline;
    color: #1d1d1d;
    outline: none;
}

.local-cci-privacy {
    margin: 0.75rem 0 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    font-size: 0.75rem;
    color: #6a6a6a;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .local-cci--bottomright {
        right: 0.5rem;
        bottom: 0.5rem;
    }
    .local-cci--bottomleft {
        left: 0.5rem;
        bottom: 0.5rem;
    }
    .local-cci-panel {
        width: calc(100vw - 1rem);
    }
}
