/*
 * Assign Heat to Cover modal – mirror of Tailwind classes used in assign_heat_cover template.
 * Used on screens that don't load Tailwind (e.g. Melt Shop Overview) so the modal looks
 * identical to Covers Report without applying Tailwind to the whole page.
 * Values match Tailwind default theme (gray-*, green-*, spacing, etc.).
 */
#my-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(75, 85, 99, 0.5);   /* bg-gray-600 bg-opacity-50 */
    overflow-y: auto;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#my-modal > div {
    position: relative;
    padding: 1.25rem;                           /* p-5 */
    border: 1px solid #e5e7eb;                  /* border, gray-200 */
    width: 20%;                                 /* w-1/5 */
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);  /* shadow-lg */
    border-radius: 0.375rem;                    /* rounded-md */
    background-color: #fff;                     /* bg-white */
    display: flex;
    flex-direction: column;
}
#my-modal .pb-3.border-b {
    padding-bottom: 0.75rem;                   /* pb-3 */
    border-bottom: 1px solid #e5e7eb;          /* border-b */
}
#my-modal .flex.justify-between.items-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#my-modal h3 {
    font-size: 1.25rem;                        /* text-xl */
    font-weight: 600;                          /* font-semibold */
    color: #111827;                            /* text-gray-900 */
    margin: 0;
    line-height: 1.75rem;
}
#my-modal .close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;                            /* text-gray-400 */
}
#my-modal .close:hover {
    color: #6b7280;                            /* hover:text-gray-500 */
}
#my-modal .close svg {
    height: 1.5rem;                            /* h-6 w-6 */
    width: 1.5rem;
}
#my-modal .py-4.border-b {
    padding-top: 1rem;
    padding-bottom: 1rem;                      /* py-4 */
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
#my-modal #coversSelectDiv,
#my-modal #heatNumberDiv {
    width: 40%;                                /* w-2/5 */
    min-width: 0;
}
#my-modal #coversSelectDiv label,
#my-modal #heatNumberDiv label {
    display: block;
    width: 100%;
    font-size: 0.875rem;                       /* text-sm */
    font-weight: 500;                          /* font-medium */
    color: #374151;                            /* text-gray-700 */
    margin-bottom: 0.5rem;                     /* mb-2 */
}
#my-modal #coversSelectDiv select,
#my-modal #heatNumberDiv select {
    width: 100%;
    height: 3rem;                              /* h-12 */
    border: 1px solid #d1d5db;                 /* border border-gray-300 */
    border-radius: 0.375rem;                   /* rounded-md */
    padding: 0 0.75rem;                         /* px-3, vertical centering via line-height */
    line-height: 3rem;                         /* center value vertically in box */
    font-size: 0.875rem;                       /* sm:text-sm */
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);  /* shadow-sm */
    appearance: none;
    box-sizing: border-box;
}
#my-modal #coversSelectDiv select:focus,
#my-modal #heatNumberDiv select:focus {
    outline: none;
    border-color: #6366f1;                     /* focus:border-indigo-500 */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);  /* focus:ring-indigo-500 */
}
/* Start row: same layout as Covers/Heats row (flex justify-between) */
#my-modal .start-datetime-row {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
#my-modal #startDatetimeDiv {
    width: 50%;                                /* w-1/2 */
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#my-modal #startDatetimeDiv label {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;                    /* mb-1 */
}
#my-modal #startDatetimeDiv input,
#my-modal #startDatetime {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;                   /* py-2 px-3 */
    font-size: 0.875rem;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}
#my-modal #startDatetime:focus {
    outline: none;
    border-color: #3b82f6;                     /* focus:border-blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);  /* focus:ring-2 focus:ring-blue-500 */
}
#my-modal .pt-4 {
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}
#my-modal #cancelBtn {
    padding: 0.5rem 1rem;                      /* py-2 px-4 */
    background-color: #d1d5db;                 /* bg-gray-300 */
    color: #1f2937;                            /* text-gray-800 */
    font-size: 1rem;                           /* text-base */
    font-weight: 500;                          /* font-medium */
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
#my-modal #cancelBtn:hover {
    background-color: #9ca3af;                 /* hover:bg-gray-400 */
}
#my-modal #cancelBtn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6b7280;             /* focus:ring-2 focus:ring-gray-500 */
}
#my-modal #acceptBtn {
    margin-left: 0.75rem;                      /* ml-3 */
    padding: 0.5rem 1rem;                      /* py-2 px-4 */
    background-color: #059669;                 /* green */
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
#my-modal #acceptBtn:hover {
    background-color: #047857;
}
#my-modal #acceptBtn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #059669;
}

/* Edit Out of Cover Alert modal – same look as assign modal for screens without Tailwind (e.g. Overview) */
#edit-alert-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(75, 85, 99, 0.5);
    overflow-y: auto;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#edit-alert-modal > div {
    position: relative;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    width: 20%;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}
#edit-alert-modal .pb-3.border-b {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
#edit-alert-modal .flex.justify-between.items-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#edit-alert-modal h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.75rem;
}
#edit-alert-modal .close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
}
#edit-alert-modal .close:hover {
    color: #6b7280;
}
#edit-alert-modal .close svg {
    height: 1.5rem;
    width: 1.5rem;
}
#edit-alert-modal .py-4.border-b {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
#edit-alert-modal #editAlertCoverDiv,
#edit-alert-modal #editAlertHeatDiv,
#edit-alert-modal #editAlertThresholdDiv {
    width: 40%;
    min-width: 0;
}
#edit-alert-modal #editAlertCoverDiv label,
#edit-alert-modal #editAlertHeatDiv label,
#edit-alert-modal #editAlertThresholdDiv label {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}
#edit-alert-modal input[type="text"],
#edit-alert-modal #editOutOfCoverAlertThreshold {
    width: 100%;
    height: 3rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    background-color: #fff;
    box-sizing: border-box;
}
#edit-alert-modal input[type="text"]:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
}
#edit-alert-modal #editOutOfCoverAlertThreshold {
    appearance: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
#edit-alert-modal #editOutOfCoverAlertThreshold:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
#edit-alert-modal .pt-4 {
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
}
#edit-alert-modal #cancelBtn {
    padding: 0.5rem 1rem;
    background-color: #d1d5db;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
#edit-alert-modal #cancelBtn:hover {
    background-color: #9ca3af;
}
#edit-alert-modal #saveAlertBtn {
    margin-left: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: #059669;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
}
#edit-alert-modal #saveAlertBtn:hover {
    background-color: #047857;
}
