/* Global UI Components */

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary), var(--primary-dim));
    color: var(--on-primary);
    font-weight: 700;
    font-size: 1.125rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 76, 239, 0.2);
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: scale(1.01);
}

.btn-primary:active {
    transform: scale(0.99);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Inpus */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--outline);
    font-size: 1.25rem;
}

.input-field {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background-color: var(--surface-container-low);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    color: var(--on-surface);
    font-size: 1rem;
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: rgba(0, 76, 239, 0.2);
    background-color: var(--surface-container-lowest);
}

/* Toast System */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    min-width: 320px;
    border-radius: 1.25rem;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    transform: translateX(50px) scale(0.9);
}

.toast.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast-success {
    background-color: var(--success);
}

.toast-error {
    background-color: var(--error);
}

.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
}

.toast-content {
    display: flex;
    flex-direction: column;
}

.toast-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.8;
}

.toast-message {
    font-size: 0.875rem;
    font-weight: 700;
}

/* Shared TopNav User Profile */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--slate-200);
}

.user-info-text {
    text-align: right;
    display: none;
}

@media (min-width: 640px) {
    .user-info-text {
        display: block;
    }
}

.user-name {
    font-size: 12px;
    font-weight: 800;
}

.user-role {
    font-size: 10px;
    color: var(--on-surface-variant);
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Page Layouts */
.canvas-config {
    max-width: auto;
    margin: 0 auto;
    width: 100%;
}