/**
 * Public-facing styles for Alroy Bedrock.
 */

/* Loading indicator */
.alroy-loading-indicator {
    background: var(--color-light, #f6f2ea);
    border: 1px solid rgba(26, 43, 60, 0.2); /* Dark color with opacity */
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

.alroy-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-light, #f6f2ea); /* Solid warm cream color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

.alroy-loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Logo in loading overlay */
.alroy-loading-logo {
    max-width: 150px;
    margin: 0 auto 1.5rem;
}

.alroy-loading-logo svg {
    width: 100%;
    height: auto;
    max-height: 60px;
}

.alroy-loading-logo path {
    fill: var(--color-primary, #FF4500); /* Primary color */
}

.alroy-spinner {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.alroy-spinner.preview-loading {
    background-image: var(--alroy-preview-gif-url);
}

.alroy-spinner.preview-complete {
    background-image: var(--alroy-mustache-gif-url);
}

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

.alroy-loading-heading {
    color: var(--color-dark, #1A2B3C);
    font-family: var(--font-family-heading, 'Delight', sans-serif);
    font-weight: var(--font-weight-heading, 700);
    font-size: 1.5rem;
    margin: 0 0 1rem;
    min-height: 2.25rem;
}

.alroy-loading-text {
    color: rgba(26, 43, 60, 0.75);
    font-size: 1.125rem;
    margin: 0 0 1.5rem;
    font-weight: var(--font-weight-body, 400);
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

/* Progress bar */
.alroy-progress-container {
    width: 80%;
    height: 6px;
    background: rgba(26, 43, 60, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 1.5rem auto;
}

.alroy-progress-bar {
    width: 0;
    height: 100%;
    background: var(--color-primary, #FF4500);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.alroy-error-message {
    color: var(--color-secondary, #800020);
    padding: 1.5rem;
    border: 1px solid rgba(128, 0, 32, 0.3);
    border-radius: 0.5rem;
    background: rgba(128, 0, 32, 0.05);
    margin-top: 1.5rem;
    font-size: 1.125rem;
    transition: opacity 0.5s ease-in-out;
}

/* Preview display */
.alroy-preview-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

.alroy-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.alroy-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-light, #f6f2ea); /* Light color */
    border: 1px solid rgba(26, 43, 60, 0.2); /* Dark color with opacity */
    border-bottom: none;
    padding: 10px;
}

.alroy-preview-toolbar-left {
    display: flex;
    align-items: center;
}

.alroy-preview-toolbar-right {
    display: flex;
    align-items: center;
}

.alroy-device-switcher {
    display: flex;
    margin-right: 15px;
}

.alroy-device-switcher button {
    background: white;
    border: 1px solid rgba(26, 43, 60, 0.2); /* Dark color with opacity */
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
    font-family: var(--font-family-body, 'Delight', sans-serif);
    transition: all 0.2s ease;
}

.alroy-device-switcher button.active {
    background: var(--color-primary, #FF4500); /* Primary color */
    color: white;
    border-color: var(--color-primary, #FF4500); /* Primary color */
}

.alroy-refresh-button {
    background: white;
    border: 1px solid rgba(26, 43, 60, 0.2); /* Dark color with opacity */
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-family: var(--font-family-body, 'Delight', sans-serif);
    transition: all 0.2s ease;
}

.alroy-refresh-button:hover {
    background: var(--color-accent, #ADFF2F); /* Accent color */
    border-color: var(--color-accent, #ADFF2F); /* Accent color */
}

.alroy-refresh-button svg {
    margin-right: 5px;
}

/* Preview form */
.alroy-preview-form {
    max-width: 600px;
    margin: 0 auto;
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

.alroy-preview-form .form-group {
    margin-bottom: 15px;
}

.alroy-preview-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: var(--font-weight-heading, 700);
    font-family: var(--font-family-heading, 'Delight', sans-serif);
    color: var(--color-dark, #1A2B3C); /* Dark color */
}

.alroy-preview-form input[type="url"],
.alroy-preview-form input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(26, 43, 60, 0.2); /* Dark color with opacity */
    border-radius: 4px;
    font-family: var(--font-family-body, 'Delight', sans-serif);
}

.alroy-preview-form button {
    background: var(--color-primary, #FF4500); /* Primary color */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family-body, 'Delight', sans-serif);
    font-weight: var(--font-weight-body, 400);
    transition: all 0.2s ease;
}

.alroy-preview-form button:hover {
    background: var(--color-secondary, #800020); /* Secondary color */
}
