/* ============================================================
   ANDROLAB — OPERATIONS → SUBSCRIPTIONS MODULE
   Mirror design of Orders (toolbar, table, modal, pagination)
============================================================ */

.androlab-subscriptions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ------------------------------
   Toolbar
------------------------------ */
.androlab-subscriptions-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.androlab-subscriptions-toolbar .filters-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.androlab-subscriptions-toolbar input,
.androlab-subscriptions-toolbar select {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
}

.androlab-subscriptions-toolbar label {
    font-size: 13px;
    color: #333;
}

.androlab-subscriptions-toolbar .androlab-btn.small {
    font-size: 13px;
    padding: 6px 10px;
}

.androlab-subscriptions-toolbar button:hover {
    background: #F05323;
    color: #fff;
    transition: 0.2s ease;
}

/* ======================================
   Subscriptions Search Input (SaaS-Style)
====================================== */

#subscription-search {
    flex: 1;
    min-width: 350px;
    max-width: 400px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 35px 8px 35px; /* space for icon */
    font-size: 14px;
    color: #111827;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M10 18a8 8 0 100-16 8 8 0 000 16z'/%3E%3C/svg%3E") 
        no-repeat 10px center;
    background-size: 18px;
    transition: all 0.2s ease;
}

#subscription-search:focus {
    background-color: #fff;
    border-color: #F05323; /* same orange accent */
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

#subscription-search::placeholder {
    color: #9ca3af;
}

/* Clear button mimic (optional, Chrome only) */
#subscription-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239ca3af' viewBox='0 0 24 24'%3E%3Cpath d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
}


/* ------------------------------
   Table
------------------------------ */
.androlab-subscriptions-table-container {
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}

.androlab-subscriptions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 1200px;
}

.androlab-subscriptions-table th,
.androlab-subscriptions-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: top;
}

.androlab-subscriptions-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.androlab-subscriptions-table tr:hover {
    background: #f3f4f6;
}

.loading, .no-subscriptions, .error {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* =======================================
   Subscriptions Pagination (Centered SaaS Style)
======================================= */

.androlab-pagination {
    display: flex;
    align-items: center;
    justify-content: center; /* <<< CENTER ALL CONTENT */
    gap: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 18px;
    margin-top: 18px;
    font-size: 14px;
}

/* Prev / Next buttons */
.androlab-pagination .page-prev,
.androlab-pagination .page-next {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    background: #111;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.androlab-pagination .page-prev:hover:not(:disabled),
.androlab-pagination .page-next:hover:not(:disabled) {
    border-color: #F05323;
    color: #F05323;
    background: #111;
}

.androlab-pagination .page-prev:disabled,
.androlab-pagination .page-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Middle text + input */
.androlab-pagination span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.androlab-pagination input#page-input {
    width: 55px;
    padding: 6px;
    border: 1px solid #111;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: 0.15s ease;
}

.androlab-pagination input#page-input:focus {
    outline: none;
    border-color: #F05323;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Total count (keeps centered alignment clean) */
.androlab-pagination .page-total {
    font-size: 13px;
    color: #6b7280;
    margin-left: 10px; /* subtle spacing */
}





/* ------------------------------
   Shipping Address / Products Column
------------------------------ */
.subscription-shipping-cell,
.subscription-products-cell {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 250px; /* adjustable */
    display: block;   /* ensures proper wrapping inside <td> */
}


.subscription-shipping-cell {
    max-width: 250px;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.androlab-subscriptions-table td,
.androlab-subscriptions-table th {
    color: #111 !important; /* or #000 */
}



/* ------------------------------
   Notes Modal (Same as Orders)
------------------------------ */
#androlab-note-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

#androlab-note-modal .androlab-modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    width: 400px;
    max-width: 90%;
    margin: 8% auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Inter", sans-serif;
}

#androlab-note-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    color: #888;
    font-size: 20px;
}

#androlab-note-modal h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

#androlab-note-modal label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #444;
}

#androlab-note-modal input[type="text"],
#androlab-note-modal input[type="date"],
#androlab-note-modal textarea,
#androlab-note-modal select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    margin-bottom: 10px;
    background: #fff;
}

#androlab-note-modal textarea {
    resize: vertical;
    min-height: 70px;
}

#androlab-note-modal button.androlab-btn.save-note-btn {
    width: 100%;
    background: #F05323;
    color: #fff;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

#androlab-note-modal button.androlab-btn.save-note-btn:hover {
    background: #F05323;
}

/* ------------------------------
   Miscellaneous
------------------------------ */
.androlab-btn.small i {
    margin-right: 4px;
}

.subscription-note i {
    color: #fff;
}

/* ============================================================
   RESPONSIVE DESIGN
============================================================ */
@media (max-width: 1024px) {
    .androlab-subscriptions-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .androlab-subscriptions-toolbar .filters-section {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .androlab-subscriptions-searchbar {
        flex-direction: column;
        align-items: stretch;
    }

    .androlab-subscriptions-searchbar input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .androlab-subscriptions-toolbar {
        padding: 10px 12px;
    }

    .androlab-subscriptions-table {
        font-size: 12.5px;
        min-width: 900px;
    }

    .androlab-subscriptions-table th,
    .androlab-subscriptions-table td {
        padding: 6px 8px;
    }

    .androlab-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .androlab-pagination span.page-total {
        display: block;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .androlab-subscriptions-toolbar select,
    .androlab-subscriptions-toolbar input {
        width: 100%;
    }

    .androlab-subscriptions-table-container {
        padding: 6px 10px;
    }

    #androlab-note-modal .androlab-modal-content {
        width: 90%;
        margin-top: 20%;
    }
}
