/**
 * Google Drive Integration Styles
 */

/* Modal Overlay */
.gdrive-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.gdrive-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.gdrive-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.gdrive-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gdrive-modal-header h3 i {
    color: #4285f4;
    font-size: 24px;
}

.gdrive-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.gdrive-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Modal Body */
.gdrive-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 300px;
}

/* Loading State */
.gdrive-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.gdrive-loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.spinner-sm {
    display: inline-block;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4285f4;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Files List */
.gdrive-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gdrive-no-files {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* File Item */
.gdrive-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.gdrive-file-item:hover {
    border-color: #4285f4;
    background: #f8f9fa;
}

.gdrive-file-item > i {
    font-size: 32px;
    flex-shrink: 0;
}

.gdrive-file-info {
    flex: 1;
    min-width: 0;
}

.gdrive-file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gdrive-file-meta {
    font-size: 13px;
    color: #666;
}

.gdrive-select-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gdrive-select-btn:hover:not(:disabled) {
    background: #357ae8;
}

.gdrive-select-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Modal Footer */
.gdrive-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.gdrive-cancel-btn {
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.gdrive-cancel-btn:hover {
    background: #e0e0e0;
}

/* Error Message */
.gdrive-error {
    text-align: center;
    padding: 40px 20px;
}

/* Google Drive Button */
.gdrive-button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.gdrive-button:hover {
    background: #357ae8;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.gdrive-button i {
    font-size: 16px;
}

.gdrive-button-secondary {
    background: white;
    color: #4285f4;
    border: 1px solid #4285f4;
}

.gdrive-button-secondary:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .gdrive-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .gdrive-modal-header,
    .gdrive-modal-body,
    .gdrive-modal-footer {
        padding: 16px;
    }

    .gdrive-file-item {
        padding: 10px;
    }

    .gdrive-file-item > i {
        font-size: 28px;
    }

    .gdrive-select-btn {
        padding: 6px 16px;
        font-size: 13px;
    }
}
