/* 
   Click To Call - Profesional Minimalista
    */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 3.5;
    background: linear-gradient(145deg, #060e15 0%, #082345 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 32px 36px 24px 24px;
}

/* ── Layout principal ── */
#main_div {
    width: 100%;
    max-width: 420px;
}

/* ── Títulos ── */
h2 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    text-align: left;
}

p {
    font-size: 13px;
    color: #8a9ab5;
    text-align: left;
    margin-bottom: 2px;
}

/* ── Notificaciones ── */
#c2c_connection_speed_div {
    display: none;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    margin-top: 14px;
    border-radius: 6px;
    text-align: left;
}

#c2c_connection_speed_div:not(:empty) {
    display: block;
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

#c2c_test_call_quality_div {
    display: none;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    margin-top: 10px;
    border-radius: 6px;
    text-align: left;
}

#c2c_call_btn svg { display: none !important; width: 0; height: 0; }

#c2c_test_call_quality_div:not(:empty) {
    display: block;
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ── Widget container (sin recuadro) ── */
#c2c_widget_div {
    margin-top: 20px;
}

/* ── Fila de botones secundarios ── */
.c2c_btn_row {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.c2c_video_row {
    align-items: center;
}

/* ── Botones secundarios ── */
#c2c_select_devices_btn,
#c2c_keypad_btn,
#c2c_screen_sharing_btn,
#c2c_test_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #c0cfe0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

#c2c_select_devices_btn:hover,
#c2c_keypad_btn:hover,
#c2c_screen_sharing_btn:hover,
#c2c_test_btn:hover {
    background: rgba(255,255,255,0.11);
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
}

/* Ocultar SVGs heredados */
#c2c_select_devices_svg,
#c2c_keypad_svg,
#c2c_screen_sharing_svg,
#c2c_test_svg,
#c2c_call_svg,
#c2c_camera_svg {
    display: none !important;
}

/* ── Botón cámara ── */
#c2c_camera_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #c0cfe0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#c2c_camera_btn:hover {
    background: rgba(255,255,255,0.11);
    color: #ffffff;
}

/* ── Checkboxes de video ── */
#c2c_video_chk_span,
#c2c_self_video_chk_span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8a9ab5;
    cursor: pointer;
}

#c2c_video_chk,
#c2c_self_video_chk {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #e59a2d;
}

/* ── Botón principal LLAMAR ── */
#c2c_call_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    border: none;
    border-radius: 8px;
    background-color: #e59a2d;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
}

#c2c_call_btn:hover {
    background-color: #cf8b27;
}

.c2c_call_btn_ready    { background-color: #e59a2d !important; }
.c2c_call_btn_ready:hover { background-color: #cf8b27 !important; }
.c2c_call_btn_hangup   { background-color: #ef4444 !important; }
.c2c_call_btn_hangup:hover { background-color: #dc2626 !important; }

.c2c_call_svg_disabled { opacity: 0.5; }
.c2c_call_svg_ready    { opacity: 1; }
.c2c_call_svg_hangup   { opacity: 1; }
.c2c_call_svg_calling  { opacity: 1; }

/* ── Status line ── */
#c2c_status_line {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
}

#c2c_status_line:not(:empty) {
    display: block;
    background: rgba(255,255,255,0.06);
    color: #a0b4cc;
    border: 1px solid rgba(255,255,255,0.1);
}

#c2c_status_line.c2c_status_calling,
#c2c_status_line.c2c_status_connected {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

#c2c_status_line.c2c_status_error,
#c2c_status_line.c2c_status_failed {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

#c2c_status_line.c2c_status_busy,
#c2c_status_line.c2c_status_warning {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
}

/* ── Selector de dispositivos ── */
#c2c_select_devices_div {
    display: none;
    margin-top: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}

#c2c_devices fieldset {
    border: none;
    padding: 0;
}

#c2c_devices legend {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

#c2c_devices dev {
    display: block;
    font-size: 13px;
    color: #8a9ab5;
    margin-bottom: 10px;
}

#c2c_devices select {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    background: #0d1a2a;
    border: 1px solid rgba(255,255,255,0.15);
    color: #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

#c2c_devices select:focus {
    outline: 2px solid #e59a2d;
    outline-offset: 1px;
}

#select_devices_done_btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: #e59a2d;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

#select_devices_done_btn:hover {
    background: #cf8b27;
}

/* ── Teclado ── */
#c2c_keypad_div {
    display: none;
    margin-top: 14px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}

#c2c_keypad_table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 8px;
}

#c2c_keypad_table td {
    width: 56px;
    height: 52px;
    text-align: center;
    vertical-align: middle;
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

#c2c_keypad_table td:hover {
    background: #e59a2d;
    border-color: #e59a2d;
    color: #ffffff;
}

/* ── Video containers ── */
#c2c_video_div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 14px;
}

#c2c_local_video,
#c2c_remote_video {
    border-radius: 8px;
    background: #000;
}

/* ── Logo "Powered by AudioCodes" ── */
.imgleft_wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 28px;
}

.powered_by_text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #4a5e72;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-family: system-ui, sans-serif;
}

.imgleft {
    display: block;
    max-width: 160px;
    height: auto;
    opacity: 0.55;
    filter: grayscale(30%);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    body {
        padding: 20px 18px 18px 18px;
    }
}