/* Lessons Calendar — front-end styles.
   Surviving WPCode snippets (1294 "Кнопки", 1286) already style the
   FullCalendar toolbar on mobile, button#lc-cancel-signup and .lc-close;
   this file only adds what is missing and must not fight them. */

/* --- Notices ------------------------------------------------------ */
.lc-notice {
    background: #f2f6ff;
    border: 1px solid #c9d8fb;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 12px 0;
    color: #1a2a4a;
    line-height: 1.5;
}
.lc-notice a {
    color: #235edf;
    text-decoration: underline;
}

/* --- Calendars ---------------------------------------------------- */
.lc-calendar {
    min-height: 320px;
    margin: 8px 0 24px;
}
.lc-calendar .fc-event {
    cursor: pointer;
}
.lc-calendar .fc-day-grid-event {
    padding: 2px 4px;
}

/* Teacher filter (student calendar only). */
.lc-teacher-filter {
    margin: 0 0 12px;
}
.lc-teacher-filter label {
    font-weight: 500;
    margin-right: 0.5em;
}
.lc-teacher-filter select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    max-width: 100%;
}

/* --- Modal -------------------------------------------------------- */
.lc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.lc-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.lc-modal-title {
    margin: 0 24px 8px 0;
    font-size: 20px;
    line-height: 1.3;
}
.lc-modal-when {
    color: #555;
    margin: 0 0 12px;
}
.lc-modal p {
    margin: 0 0 10px;
    line-height: 1.5;
}
.lc-modal-materials {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}
.lc-modal-materials li {
    margin: 0 0 4px;
}
.lc-modal-materials a {
    color: #235edf;
    word-break: break-all;
}
.lc-modal-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lc-modal-balance {
    background: #f2f6ff;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 12px;
}
.lc-modal-note {
    background: #f6f6f6;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 12px;
    color: #555;
}

/* Buttons (button#lc-cancel-signup is styled by the surviving snippet;
   keep the same look for the other modal buttons). */
.lc-btn,
#lc-signup,
#lc-cancel-lesson,
a.lc-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #235edf;
    color: #fff;
    border: 1px solid #235edf;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}
.lc-btn:hover,
#lc-signup:hover,
#lc-cancel-lesson:hover,
a.lc-btn:hover {
    background-color: #1a4cbd;
    border-color: #1a4cbd;
    color: #fff;
}
#lc-signup:disabled,
.lc-btn:disabled {
    background-color: #9aa0a6;
    border-color: #9aa0a6;
    cursor: not-allowed;
}
#lc-cancel-lesson {
    background-color: #fff;
    color: #c0392b;
    border-color: #c0392b;
}
#lc-cancel-lesson:hover {
    background-color: #fdf0ef;
    color: #c0392b;
    border-color: #c0392b;
}
a.lc-btn-edit {
    background-color: #fff;
    color: #235edf;
    border-color: #235edf;
}
a.lc-btn-edit:hover {
    background-color: #f2f6ff;
    color: #235edf;
    border-color: #235edf;
}

/* --- Forms (#lc-new-lesson / #lc-edit-lesson) --------------------- */
.lc-form {
    max-width: 560px;
}
.lc-field {
    margin: 0 0 14px;
}
.lc-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}
/* The surviving WPCode snippet 1294 sets these inputs to width:15px on
   mobile (looks like a typo in the original CSS). Override it — the
   snippet itself must not be touched. */
#lc-new-lesson input,
#lc-new-lesson textarea,
#lc-new-lesson select,
#lc-edit-lesson input,
#lc-edit-lesson textarea,
#lc-edit-lesson select {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
    margin-bottom: 8px;
}
#lc-new-lesson textarea,
#lc-edit-lesson textarea {
    resize: vertical;
    min-height: 80px;
}
.lc-form-msg {
    margin: 0 0 14px;
    line-height: 1.5;
}
.lc-form-msg.lc-success {
    color: #1e7a46;
}
.lc-form-msg.lc-error {
    color: #c0392b;
}
.lc-back-link {
    margin-top: 14px;
}

/* --- Teacher balance ---------------------------------------------- */
.lc-balance-table {
    width: 100%;
    max-width: 560px;
    border-collapse: collapse;
    margin: 12px 0;
}
.lc-balance-table th,
.lc-balance-table td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}
.lc-balance-table th {
    background: #f6f6f6;
    font-weight: 500;
    width: 70%;
}
.lc-balance-table td {
    text-align: center;
    font-weight: 700;
}

/* --- Toast -------------------------------------------------------- */
.lc-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #1a2a4a;
    color: #fff;
    border-radius: 8px;
    padding: 12px 18px;
    z-index: 10000;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    text-align: center;
}
.lc-toast.lc-toast-error {
    background: #c0392b;
}
