/* Connector Modal Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8eaed;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f3f4;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #e8eaed;
    color: #202124;
}

.modal-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
    max-height: 60vh;
}

/* Connector Categories */
.connector-category {
    margin-bottom: 20px;
}

.connector-category:last-child {
    margin-bottom: 0;
}

.category-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5f6368;
    margin-bottom: 10px;
}

.connector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Connector Items */
.connector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.connector-item:hover {
    background: #f1f3f4;
}

.connector-item.connected {
    background: rgba(15, 157, 88, 0.08);
    border-color: rgba(15, 157, 88, 0.3);
}

.connector-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Connector Icon Colors */
.connector-item-icon.google-ads { background: #e8f0fe; color: #4285f4; }
.connector-item-icon.meta-ads { background: #e7f3ff; color: #0081fb; }
.connector-item-icon.google-drive { background: #e6f4ea; color: #0f9d58; }
.connector-item-icon.google-analytics { background: #fef7e0; color: #e37400; }
.connector-item-icon.mysql { background: #fff4e5; color: #00758f; }
.connector-item-icon.postgresql { background: #e8f4f8; color: #336791; }
.connector-item-icon.bigquery { background: #e8f0fe; color: #4285f4; }
.connector-item-icon.sheets { background: #e6f4ea; color: #0f9d58; }
.connector-item-icon.hubspot { background: #fff1f0; color: #ff7a59; }
.connector-item-icon.salesforce { background: #e5f6fd; color: #00a1e0; }

.connector-item-info {
    flex: 1;
}

.connector-item-name {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.connector-item-status {
    font-size: 12px;
    color: #5f6368;
    margin-top: 2px;
}

.connector-item.connected .connector-item-status {
    color: #0f9d58;
}

.connector-item-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f9d58;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.connector-item.connected .connector-item-check {
    opacity: 1;
    transform: scale(1);
}

/* Connection Animation States */
.connector-item.connecting {
    background: rgba(66, 133, 244, 0.08);
    border-color: rgba(66, 133, 244, 0.3);
}

.connector-item.connecting .connector-item-icon {
    animation: connectPulse 1s ease-in-out infinite;
}

.connector-item.connecting .connector-item-status {
    color: #4285f4;
}

/* Connecting spinner */
.connector-item-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e8eaed;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.connector-item.connecting .connector-item-spinner {
    display: block;
}

.connector-item.connecting .connector-item-check {
    display: none;
}

/* Success flash animation */
.connector-item.connect-success {
    animation: connectSuccess 0.5s ease-out;
}

@keyframes connectPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes connectSuccess {
    0% { background: rgba(15, 157, 88, 0.08); }
    50% { background: rgba(15, 157, 88, 0.2); }
    100% { background: rgba(15, 157, 88, 0.08); }
}

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

/* Connector Button in Input Area */
.connector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f1f3f4;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #5f6368;
    transition: all 0.15s;
    font-family: inherit;
}

.connector-btn:hover {
    background: #e8eaed;
    color: #202124;
}

.connector-btn .material-symbols-outlined {
    font-size: 18px;
}

.connector-btn-count {
    background: #0f9d58;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
