/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, p {
    margin: 0;
    padding: 0;
}

.small-text {
    font-size: 12px;
}

/* Centering the container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    flex-direction: column;
}

/* Welcome Screen Styles */
#welcome-screen {
    text-align: center;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
}

#welcome-screen h1 {
    font-size: 2.5rem;
    color: #333;
}

#welcome-screen p {
    font-size: 1rem;
    margin: 15px 0;
    color: #555;
}

#welcome-screen button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px;
    transition: background-color 0.3s;
}

#no-btn {
    background-color: black;
}

#no-btn:hover {
    background-color: #8a8a8a;
}

#welcome-screen button:hover {
    background-color: #fcd722;
}

/* Post-Agreement Section */
#post-agreement {
    display: none;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

#post-agreement select {
    padding: 10px;
    font-size: 1rem;
    width: 100%;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#brand-name {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #555;
    display: none;
}

/* Error Message Styles */
#error-message {
    display: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

/* Loading Screen */
#loading-screen {
    text-align: center;
    font-size: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 25px;
    border-radius: 10px;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

#loading-screen:after {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    margin: 20px auto 0;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Iframe Section */
#iframe-section {
    display: none;
    width: 100%;
    height: 100vh;
    flex-direction: column;
}

header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fcd722;
    color: white;
    padding: 8px;
    height: 4vh;
}

#logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

#brand-info {
    font-size: 0.8rem;
    color: #000;
}

footer {
    text-align: center;
    background-color: #000;
    color: white;
    padding: 7px;
    font-size: 0.7rem;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#iframe {
    width: 100%;
    height: 92vh;
    border: none;
}

/* Media Queries */
@media (max-width: 600px) {
    #welcome-screen, #post-agreement {
        width: 90%;
    }

    header, footer {
        padding: 15px;
    }

    #logo-text {
        font-size: 1.2rem;
    }
}

/* Back Button Styling */
#back-to-brands, #error-back-btn, #back-to-region {
    background-color: #555;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.2s;
}

#back-to-brands:hover, #error-back-btn:hover, #back-to-region:hover {
    background-color: #fcd722;
    color: #000;
    transform: scale(1.05);
}

#logo-text a {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#logo-text a:hover {
    opacity: 0.7;
}
