/* =========================================================
   UPLOAD SOURCES BAR  (Computer / Google Drive / Dropbox / OneDrive)
   Sits at the bottom of every tool's upload box.
========================================================= */

.gp-sources {
    margin: 24px auto 0;
    padding-top: 18px;

    border-top: 1px dashed var(--gp-border-2, #d5deec);

    text-align: center;
    cursor: default;
}

.gp-sources-label {
    display: block;
    margin-bottom: 10px;

    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--gp-muted-2, #8a96ab);
}

.gp-sources-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.gp-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 15px;

    border: 1px solid var(--gp-border-2, #d5deec);
    border-radius: 10px;
    background: #ffffff;

    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gp-navy, #12264a);

    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.gp-source:hover:not(:disabled) {
    border-color: var(--gp-blue, #2563eb);
    background: var(--gp-bg-tint, #f3f7ff);
}

.gp-source.active {
    border-color: var(--gp-blue, #2563eb);
    background: var(--gp-bg-tint, #f3f7ff);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gp-source:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.gp-source small {
    padding: 1px 6px;

    border-radius: 999px;
    background: #eef2f8;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gp-muted-2, #6b7a90);
}

.gp-source-icon {
    font-size: 16px;
    line-height: 1;
}


/* =========================================================
   GOOGLE DRIVE PICKER (modal)
========================================================= */

.gp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.gp-modal.open {
    display: flex;
}

.gp-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(10, 20, 40, 0.55);
}

.gp-modal-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 640px;
    max-height: min(680px, 90vh);

    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(10, 20, 40, 0.35);

    overflow: hidden;
    text-align: left;
}

.gp-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 22px 24px 14px;
}

.gp-modal-header h2 {
    margin: 0 0 4px;

    font-family: var(--gp-font-heading, inherit);
    font-size: 20px;
    color: var(--gp-navy, #12264a);
}

.gp-modal-header p {
    margin: 0;

    font-size: 13.5px;
    color: var(--gp-text-2, #55637a);
}

.gp-modal-close {
    flex: none;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;
    background: #f1f4f9;

    font-size: 22px;
    line-height: 1;
    color: var(--gp-navy, #12264a);

    cursor: pointer;
}

.gp-modal-close:hover {
    background: #e4e9f2;
}

.gp-modal-body {
    flex: 1;
    min-height: 160px;

    padding: 0 24px 8px;
    overflow-y: auto;
}

.gp-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.gp-toolbar input {
    flex: 1;
    min-width: 0;

    padding: 10px 14px;

    border: 1px solid var(--gp-border-2, #d5deec);
    border-radius: 10px;

    font: inherit;
    font-size: 14px;
}

.gp-toolbar button {
    padding: 0 16px;

    border: 1px solid var(--gp-border-2, #d5deec);
    border-radius: 10px;
    background: #ffffff;

    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gp-navy, #12264a);

    cursor: pointer;
}

.gp-state {
    padding: 34px 10px;

    text-align: center;
    font-size: 14.5px;
    color: var(--gp-text-2, #55637a);
}

.gp-state h3 {
    margin: 0 0 8px;

    font-size: 17px;
    color: var(--gp-navy, #12264a);
}

.gp-state.error {
    color: #b42318;
}

.gp-connect-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 11px 22px;

    border-radius: 10px;
    background: var(--gp-blue, #2563eb);

    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.gp-connect-btn:hover {
    background: var(--gp-blue-dark, #1d4ed8);
}

.gp-files {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.gp-file {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    padding: 10px 12px;

    border: 1px solid var(--gp-border, #e3e9f3);
    border-radius: 12px;
    background: #ffffff;

    font: inherit;
    text-align: left;

    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.gp-file:hover:not(:disabled) {
    border-color: var(--gp-blue, #2563eb);
}

.gp-file.selected {
    border-color: var(--gp-blue, #2563eb);
    background: var(--gp-bg-tint, #f3f7ff);
}

.gp-file:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gp-file-icon {
    flex: none;
    font-size: 22px;
}

.gp-file-main {
    flex: 1;
    min-width: 0;
}

.gp-file-name {
    display: block;

    font-size: 14px;
    font-weight: 600;
    color: var(--gp-navy, #12264a);

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-file-meta {
    display: block;
    margin-top: 2px;

    font-size: 12px;
    color: var(--gp-muted-2, #8a96ab);
}

.gp-file-check {
    flex: none;

    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid var(--gp-border-2, #cbd5e5);
    border-radius: 50%;

    font-size: 13px;
    color: transparent;
}

.gp-file.selected .gp-file-check {
    border-color: var(--gp-blue, #2563eb);
    background: var(--gp-blue, #2563eb);
    color: #ffffff;
}

.gp-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 14px 24px 18px;

    border-top: 1px solid var(--gp-border, #e3e9f3);
}

.gp-footer-left {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 13px;
    color: var(--gp-text-2, #55637a);
}

.gp-link-btn {
    padding: 0;

    border: 0;
    background: none;

    font: inherit;
    font-size: 13px;
    color: var(--gp-blue, #2563eb);
    text-decoration: underline;

    cursor: pointer;
}

.gp-footer-right {
    display: flex;
    gap: 10px;
}

.gp-btn {
    padding: 10px 20px;

    border: 1px solid var(--gp-border-2, #d5deec);
    border-radius: 10px;
    background: #ffffff;

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--gp-navy, #12264a);

    cursor: pointer;
}

.gp-btn.primary {
    border-color: var(--gp-blue, #2563eb);
    background: var(--gp-blue, #2563eb);
    color: #ffffff;
}

.gp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 560px) {

    .gp-modal {
        padding: 10px;
    }

    .gp-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .gp-footer-right {
        justify-content: stretch;
    }

    .gp-footer-right .gp-btn {
        flex: 1;
    }

    .gp-source {
        padding: 9px 12px;
    }
}
