/* =============================================
   Fina Stock — Frontend Styles
   ============================================= */

/* Trigger button */
.fina-stock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.fina-stock-btn:hover {
    background: #16213e;
}

/* Overlay */
.fina-stock-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}
.fina-stock-overlay[hidden] {
    display: none;
}

/* Modal box */
.fina-stock-modal {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.fina-stock-modal h2 {
    margin: 0 0 20px;
    font-size: 18px;
}

/* Close button */
.fina-stock-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
}
.fina-stock-close:hover {
    color: #000;
}

/* Status badge */
.fina-stock-status {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 18px;
}
.fina-stock-in  { background: #d4edda; color: #155724; }
.fina-stock-out { background: #f8d7da; color: #721c24; }

/* Locations table */
.fina-stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.fina-stock-table th,
.fina-stock-table td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}
.fina-stock-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.fina-loc-out td {
    color: #999;
}

/* Loading spinner */
.fina-stock-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #ddd;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: fina-spin 0.7s linear infinite;
}
@keyframes fina-spin {
    to { transform: rotate(360deg); }
}

/* Error message */
.fina-stock-error {
    color: #721c24;
    background: #f8d7da;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 14px;
}
