/* ============================================================
   site-custom.css
   Project-specific enhancements built on top of main.css
   (Editorial HTML5 UP theme)
   ============================================================ */

/* ----- Theme Alert Boxes (replace Bootstrap alerts) ----- */
.alert-box {
    border-radius: 0.375em;
    padding: 1em 1.5em;
    margin: 0 0 2em 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75em;
    animation: alertSlideIn 0.35s ease-out;
}

.alert-box .alert-icon {
    flex-shrink: 0;
    font-size: 1.25em;
}

.alert-box .alert-content {
    flex-grow: 1;
    font-weight: 600;
}

.alert-box .alert-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.25em;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    padding: 0;
    line-height: 1;
    color: inherit;
    box-shadow: none;
}

.alert-box .alert-close:hover {
    opacity: 1;
    background: none;
}

.alert-box.alert-info {
    background: rgba(86, 170, 255, 0.1);
    border-left: 4px solid #56aaff;
    color: #2c6faa;
}

.alert-box.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    color: #8a6d00;
}

.alert-box.alert-danger {
    background: rgba(245, 106, 106, 0.1);
    border-left: 4px solid #f56a6a;
    color: #c44;
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-0.5em); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----- Section Spacing ----- */
.page-section {
    margin-top: 1.5em;
}

/* ----- Search Bar (inline filter form) ----- */
.search-bar {
    display: flex;
    align-items: flex-end;
    gap: 1em;
    flex-wrap: wrap;
}

.search-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 0.35em;
    font-size: 0.9em;
    color: #3d4449;
    white-space: nowrap;
}

.search-field input[type="date"],
.search-field input[type="text"],
.search-field input[type="datetime-local"] {
    min-width: 160px;
}

.search-separator {
    display: flex;
    align-items: center;
    padding-bottom: 0.55em;
    font-size: 1.1em;
    color: #7f888f;
}

.search-action {
    padding-bottom: 0.1em;
}

@media screen and (max-width: 736px) {
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-separator {
        justify-content: center;
        padding-bottom: 0;
    }

    .search-field input[type="date"],
    .search-field input[type="text"],
    .search-field input[type="datetime-local"] {
        width: 100%;
    }
}

/* ----- Sent Log Table Columns ----- */
.col-date {
    width: 175px;
    white-space: nowrap;
}

.col-channel {
    width: 100px;
    text-align: center;
}

.col-target {
    width: 80px;
    text-align: center;
}

.col-info {
    word-break: break-word;
}



/* ----- Help Tip Enhancement ----- */
.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(245, 106, 106, 0.15);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    line-height: 20px;
    cursor: help;
    vertical-align: middle;
    margin-left: 0.35em;
    transition: background-color 0.2s ease;
}

.help-tip:hover {
    background-color: rgba(245, 106, 106, 0.35);
}

.help-tip:before {
    content: '?';
    font-weight: 700;
    color: #f56a6a;
}

/* ----- Detail Table (key-value pairs) ----- */
.detail-table {
    width: 100%;
}

.detail-table th {
    width: 30%;
    min-width: 160px;
    color: #3d4449;
    font-weight: 600;
    vertical-align: top;
    padding: 0.75em 1em 0.75em 0;
    border-bottom: solid 1px rgba(210, 215, 217, 0.75);
}

.detail-table td {
    padding: 0.75em 0;
    border-bottom: solid 1px rgba(210, 215, 217, 0.75);
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

/* ----- Form Field Spacing ----- */
.form-table th {
    width: 30%;
    min-width: 160px;
    color: #3d4449;
    font-weight: 600;
    vertical-align: middle;
    padding: 0.65em 1em 0.65em 0;
}

.form-table td {
    padding: 0.65em 0;
}

/* ----- Buttons inside tables ----- */
td .actions {
    margin-bottom: 0;
}

td .actions li {
    padding-bottom: 0;
}

/* ----- Page Header Enhancement ----- */
#header {
    border-bottom-color: #f56a6a;
}

#header h2 {
    margin-bottom: 0;
}

/* ----- Sidebar Menu Enhancement ----- */
#menu ul li a {
    border-bottom: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

#menu ul li a:hover {
    padding-left: 0.35em;
}

#menu ul li a .menu-icon {
    display: inline-block;
    width: 1.5em;
    text-align: center;
    margin-right: 0.4em;
    color: #f56a6a;
}

/* ----- Pagination Wrapper ----- */
.pagination-wrapper {
    text-align: center;
    margin-top: 2em;
}

.pagination-wrapper .pagination {
    justify-content: center;
}

/* ----- Feature Cards for Index ----- */
.welcome-features {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    margin: 2em 0;
}

.welcome-card {
    flex: 1 1 calc(50% - 2em);
    min-width: 220px;
    border-radius: 0.375em;
    border: solid 1px rgba(210, 215, 217, 0.75);
    padding: 1.5em;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.welcome-card:hover {
    box-shadow: 0 0.25em 1em rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.welcome-card .card-icon {
    color: #f56a6a;
    font-size: 1.75em;
    margin-bottom: 0.5em;
}

.welcome-card h3 {
    font-size: 1.1em;
    margin-bottom: 0.5em;
}

.welcome-card p {
    margin-bottom: 0;
    font-size: 0.95em;
}

/* ----- Info / Warning Boxes (inline content) ----- */
.info-box {
    background-color: rgba(86, 170, 255, 0.08);
    border-left: 4px solid #56aaff;
    border-radius: 0 0.375em 0.375em 0;
    padding: 1em 1.25em;
    margin: 1.5em 0;
}

.warning-box {
    background-color: rgba(255, 193, 7, 0.08);
    border-left: 4px solid #ffc107;
    border-radius: 0 0.375em 0.375em 0;
    padding: 1em 1.25em;
    margin: 1.5em 0;
}

/* ----- Accordion Enhancement ----- */
.accordion {
    background-color: #f5f6f7;
    color: #3d4449;
    cursor: pointer;
    padding: 1em 1.25em;
    width: 100%;
    border: solid 1px rgba(210, 215, 217, 0.75);
    border-radius: 0.375em;
    text-align: left;
    outline: none;
    font-size: 1em;
    font-family: "Roboto Slab", serif;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-bottom: 0.25em;
}

.accordion:hover,
.accordion.active {
    background-color: #fff;
    border-color: #f56a6a;
    color: #f56a6a;
}

.accordion:before {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    float: right;
    font-size: 0.8em;
    transition: transform 0.3s ease;
    color: #9fa3a6;
}

.accordion.active:before {
    transform: rotate(-180deg);
    color: #f56a6a;
}

.panel {
    padding: 1.25em 1.5em;
    display: none;
    background-color: #ffffff;
    border: solid 1px rgba(210, 215, 217, 0.75);
    border-top: none;
    border-radius: 0 0 0.375em 0.375em;
    margin-bottom: 1em;
    overflow: hidden;
}

/* ----- Secret field ----- */
.secret-field {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.secret-field .secret-toggle {
    border-bottom: none;
    color: #9fa3a6;
    transition: color 0.2s ease;
}

.secret-field .secret-toggle:hover {
    color: #f56a6a;
}

/* ----- Responsive table improvements ----- */
@media screen and (max-width: 736px) {
    .detail-table th,
    .form-table th {
        width: 40%;
        min-width: 120px;
    }

    .welcome-features {
        flex-direction: column;
    }

    .welcome-card {
        flex: 1 1 100%;
    }
}

/* ----- Code block styling ----- */
.code-block {
    background-color: #f5f6f7;
    border: solid 1px rgba(210, 215, 217, 0.75);
    border-radius: 0.375em;
    padding: 1em 1.25em;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    overflow-x: auto;
    white-space: pre;
    margin: 1em 0;
    line-height: 1.75;
}

/* ----- State table ----- */
.state-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.state-table th,
.state-table td {
    border: solid 1px rgba(210, 215, 217, 0.75);
    padding: 0.65em 1em;
    text-align: left;
}

.state-table th {
    background-color: #f5f6f7;
    color: #3d4449;
    font-weight: 600;
}

.state-table tr:nth-child(even) {
    background-color: rgba(230, 235, 237, 0.25);
}

/* ----- Step list ----- */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    counter-increment: step-counter;
    margin-bottom: 1em;
    padding-left: 2.75em;
    position: relative;
}

.step-list li::before {
    content: counter(step-counter);
    background-color: #f56a6a;
    color: #ffffff;
    font-weight: 700;
    width: 1.75em;
    height: 1.75em;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0.1em;
    font-size: 0.85em;
}

/* ----- Checkbox in table (Teams link) ----- */
td input[type="checkbox"][disabled] {
    opacity: 0.6;
}

/* ----- Empty state ----- */
.empty-state {
    text-align: center;
    padding: 3em 2em;
    color: #9fa3a6;
}

.empty-state .icon {
    font-size: 3em;
    margin-bottom: 0.5em;
    color: rgba(210, 215, 217, 0.75);
}

.empty-state h3 {
    color: #7f888f;
}
