/**
 * Travelblox Connector Drawer Styles
 */

.tb-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

.tb-drawer.tb-drawer--visible {
    pointer-events: auto;
}

.tb-drawer__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.tb-drawer--visible .tb-drawer__backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.tb-drawer__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90%;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.tb-drawer--visible .tb-drawer__panel {
    transform: translateY(0);
}

.tb-drawer__header {
    padding: 8px 16px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.tb-drawer__close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
    transition: color 0.2s;
}

.tb-drawer__close:hover {
    color: #000;
}

.tb-drawer__content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.tb-drawer__body {
    width: 100%;
    height: 100%;
    position: relative;
}

.tb-drawer__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.tb-drawer__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.tb-drawer__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #333;
    border-radius: 50%;
    animation: tb-spin 1s linear infinite;
}

@keyframes tb-spin {
    to { transform: rotate(360deg); }
}

.tb-drawer__error {
    color: #c00;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    margin: 0;
}

@media (min-width: 768px) {
    .tb-drawer__panel {
        height: 85%;
        max-width: 1300px;
        left: 50%;
        transform: translate(-50%, 100%);
    }
    
    .tb-drawer--visible .tb-drawer__panel {
        transform: translate(-50%, 0);
    }
}
