/* Xero Official Branding Styles
 * Based on Xero Brand Guidelines
 * https://developer.xero.com/documentation/guides/how-to-guides/branding-your-integration
 */

/* Xero Brand Colors */
:root {
    --xero-blue: #13B5EA;
    --xero-blue-dark: #0E8EB8;
    --xero-blue-light: #4DC4F0;
    --xero-white: #FFFFFF;
    --xero-text: #1A1A1A;
}

/* Connect to Xero Button - Official Style */
.xero-connect-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2px 15px;
    background-color: var(--xero-blue);
    color: var(--xero-white);
    border: none;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    min-height: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xero-connect-button:hover {
    background-color: var(--xero-blue-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.xero-connect-button:active {
    background-color: var(--xero-blue-dark);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xero-connect-button:disabled {
    background-color: #CCCCCC;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.xero-connect-button:focus {
    outline: 2px solid var(--xero-blue-light);
    outline-offset: 2px;
}

/* Disconnect Button - Neutral Style */
.xero-disconnect-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 15px;
    background-color: var(--xero-blue);
    color: var(--xero-white);
    border: none;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    min-height: 36px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xero-disconnect-button:hover {
    background-color: #E94B3C;
    color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.xero-disconnect-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xero-disconnect-button:disabled {
    border-color: #CCCCCC;
    color: #CCCCCC;
    background-color: #F5F5F5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Xero Logo in Button */
.xero-button-logo {
    width: auto;
    height: 32px;
    display: inline-block;
}

/* Small variant for compact areas */
.xero-connect-button-small,
.xero-disconnect-button-small {
    
    font-size: 14px;
    max-height: 26px;
}

    .xero-connect-button-small .xero-button-logo,
    .xero-disconnect-button-small .xero-button-logo {
        width: auto;
        height: 25px;
    }

/* Xero "Powered by" Badge */
.xero-powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #F5F5F5;
    border-radius: 4px;
    font-size: 12px;
    color: #666666;
    text-decoration: none;
}

.xero-powered-badge img {
    height: 16px;
    width: auto;
}

/* Xero Connection Status Badge */
.xero-status-connected {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background-color: #E8F7F0;
    color: #0F7A4F;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.xero-status-disconnected {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background-color: #FFEBE9;
    color: #E94B3C;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

/* Xero Loading State */
.xero-button-loading {
    opacity: 0.7;
    cursor: wait;
}

.xero-button-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: xero-spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes xero-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .xero-connect-button,
    .xero-disconnect-button {
        width: 100%;
        justify-content: center;
    }
}
