@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');


/* Sage Authentication Modal Styles */
.sage-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.sage-auth-modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.sage-auth-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.sage-auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F4F5F7;
    padding: var(--qs-padding);
    border-bottom: 1px solid #e1e1e1;
}

.sage-auth-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.sage-auth-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.sage-auth-modal-body {
    padding: 25px;
}

.sage-auth-modal-body p {
    margin: 0 0 20px;
    color: #666;
    line-height: 1.5;
}

.sage-form-group {
    margin-bottom: 20px;
}

.sage-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sage-form-group input {
    width: 100%;
    padding: var(--qs-padding);
    border: 1px solid var(--qs-border-dark);
    border-radius: var(--qs-radius-md);
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sage-form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.sage-auth-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 50px;
}

.sage-auth-actions .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sage-auth-cancel {
    background: #f7f7f7;
    border: 1px solid #ccc;
    color: #555;
}

.sage-auth-cancel:hover {
    background: #e7e7e7;
    border-color: #999;
}

.sage-auth-submit {
    position: relative;
    min-width: 140px;
}

.sage-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}



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

.sage-auth-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.sage-auth-message.error {
    background: #ffeaea;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.sage-auth-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.sage-auth-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Loading State */
.sage-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.sage-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    margin-right: 10px;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Auth Button Styles */
.sage-auth-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sage-auth-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sage-auth-button:hover {
    background: #005a87;
    color: white;
}

.sage-auth-button .dashicons {
    font-size: 16px;
}

.sage-connected-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f8f0;
    border: 1px solid #d0e8d0;
    border-radius: 6px;
    font-size: 14px;
}

.sage-connected-text {
    color: #333;
}

/* Connected State Styles */
.sage-connected-view {
    text-align: center;
    padding: 20px 0;
}

.sage-connected-icon {
    margin: 0 auto 20px;
    width: 70px;
    height: 70px;
    background: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sage-connected-icon .dashicons {
    font-size: 40px;
    color: #28a745;
}

.sage-connected-view h3 {
    color: #333;
    margin: 0 0 10px;
}

.sage-connected-view p {
    color: #666;
    margin: 0 0 20px;
}

.sage-user-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.sage-user-info p {
    margin: 0 0 10px;
    font-size: 14px;
}

.sage-user-info strong {
    color: #333;
}

.sage-connected-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.sage-sync-now-button {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.sage-sync-now-button:hover {
    background: #218838;
    border-color: #1e7e34;
    color: white;
}

.sage-disconnect-button {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.sage-disconnect-button:hover {
    background: #c82333;
    border-color: #bd2130;
    color: white;
}

/* Responsive Design */
@media (max-width: 480px) {
    .sage-auth-modal-content {
        margin: 10px;
        max-width: none;
    }
    
    .sage-auth-modal-header,
    .sage-auth-modal-body {
        padding: 20px;
    }
    
    .sage-auth-actions,
    .sage-connected-actions {
        flex-direction: column;
    }
    
    .sage-auth-actions .button,
    .sage-connected-actions .button {
        width: 100%;
        justify-content: center;
    }
}