/* ClassEase Meet UI polish overrides
   Pure CSS only: fixes button/icon alignment, spacing, and mobile wrapping without changing PHP/JS behavior. */
:root {
    --ce-blue: #2563eb;
    --ce-blue-dark: #1d4ed8;
    --ce-ink: #0f172a;
    --ce-muted: #64748b;
    --ce-line: #e2e8f0;
    --ce-radius: 14px;
    --ce-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

button,
a.btn,
.btn,
.join-btn,
.home-btn,
.copy,
.focus-action,
.control-btn,
.tile-btn,
.chat-tool-btn,
.chat-send-btn,
.chat-close,
.permission-primary,
.permission-secondary,
.actions a.primary,
.actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.48rem !important;
    line-height: 1.05 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
}

button > svg,
a.btn > svg,
.btn > svg,
.control-btn > svg,
.tile-btn > svg,
.chat-tool-btn > svg,
.chat-send-btn > svg {
    flex: 0 0 auto;
    display: block;
}

button:disabled,
.btn:disabled,
button[disabled] {
    cursor: not-allowed !important;
}

/* Main form/card buttons */
.join-btn,
.home-btn,
.copy,
.permission-primary,
.permission-secondary {
    min-height: 46px;
    font-weight: 850 !important;
    letter-spacing: -0.01em;
}

.home-btn {
    color: var(--ce-blue) !important;
}

/* Bootstrap/dashboard button consistency */
.btn {
    min-height: 38px;
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

.btn-sm {
    min-height: 34px;
    padding-top: 0.42rem !important;
    padding-bottom: 0.42rem !important;
}

.cm-actions,
.actions {
    align-items: center !important;
}

.cm-actions .btn,
.actions a {
    flex: 0 0 auto;
}

.cm-section-head .btn,
.cm-topbar .btn,
.cm-hero .btn {
    min-height: 40px;
}

/* Meeting screen controls */
.controls-wrap {
    overflow-x: clip;
}

.controls {
    width: 100%;
    max-width: 980px;
}

.control-btn {
    min-height: 48px;
    padding: 0 16px !important;
    line-height: 1 !important;
    text-wrap: nowrap;
}

.control-btn .chat-badge {
    margin-left: 0.15rem;
    flex: 0 0 auto;
}

.control-btn.record,
.control-btn.stop-record,
.control-btn.leave {
    font-weight: 900 !important;
}

.tile-actions {
    align-items: center;
}

.tile-btn {
    flex: 0 0 auto;
    padding: 0 !important;
    line-height: 1 !important;
}

.tile-btn.mute-client {
    position: relative;
}

.tile-btn.mute-client svg {
    margin: 0 !important;
}

.focus-toolbar {
    align-items: center !important;
}

.focus-action {
    min-height: 36px;
}

/* Chat controls */
.chat-close,
.chat-tool-btn,
.chat-send-btn {
    padding: 0 !important;
    flex: 0 0 auto;
}

.chat-input-row {
    align-items: flex-end !important;
}

.chat-input {
    line-height: 1.35 !important;
}

.chat-panel {
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22) !important;
}

/* Inputs */
input,
textarea,
select {
    line-height: 1.3;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* Better mobile wrapping without changing actions/functions */
@media (max-width: 780px) {
    .controls {
        gap: 8px !important;
        justify-content: center !important;
    }

    .control-btn {
        min-width: 78px !important;
        height: 42px !important;
        min-height: 42px !important;
        padding: 0 9px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
        gap: 0.32rem !important;
    }

    .control-btn.record,
    .control-btn.stop-record {
        min-width: 112px !important;
    }

    .control-btn.leave {
        min-width: 82px !important;
    }

    .join-card,
    .card {
        max-width: 100%;
    }

    .btn,
    .copy,
    .join-btn,
    .home-btn {
        min-height: 44px;
    }

    .cm-actions {
        justify-content: flex-start !important;
    }

    .cm-actions .btn {
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .controls-wrap {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .control-btn {
        min-width: 70px !important;
        padding: 0 8px !important;
        font-size: 11.5px !important;
    }

    .control-btn.record,
    .control-btn.stop-record {
        min-width: 104px !important;
    }

    .topbar .pill {
        font-size: 11px !important;
    }

    .permission-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 10px !important;
    }

    .permission-actions button {
        width: 100% !important;
    }
}

@media (hover: none) {
    button:hover,
    .btn:hover,
    .control-btn:hover,
    .tile-btn:hover,
    .copy:hover,
    .join-btn:hover,
    .home-btn:hover {
        transform: none !important;
    }
}
