/* STRUCTURE */
html { font-size: 16px; }
body { font-family: sans-serif; font-size: 1rem; line-height: 1.6; max-width: 100%; margin: 0 auto; padding: 0; background-color: #f4f4f4; }
.main-header {
    width: 100%;
    min-height: 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
}
.top-center-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}
.statusContainer { display: none; }
.header-divider { width: 100%; height: 10px; background-color: #333; border: none; }
.logo { width: 400px; height: auto; }
.logo > img { width: 100%; max-width: 400px; height: auto; display: block; }
.logo a { display: flex; align-items: center; }
.sign-up { width: 400px; text-align: center; }
.sign-up a {
    display: inline-block;
    padding: 2px 5px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    /* Essential for mobile: */
    min-width: 10px; 
    min-height: 10px;
}
.footer {
    width: 100%;
    /* height: 60px; */
    background-color: #333;
    border: none;
    color:#ccc;
}
.footer div {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: pre-wrap;
}
.footer a {
  color: #fff;
}
h1 { color: #333; font-size: 1.8rem; margin: 15px 0; }
h2 { color: #333; font-size: 1.2rem; margin: 12px 0; }
h4 { color: #333; font-size: 1rem; margin: 10px 0; }

/* LAYOUT */
.main-container { width: 100%; margin: 0 auto 20px auto; }
section { margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
.row { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.col { flex: 1; }

/* FORM ELEMENTS */
.form-name { 
    margin: 15px 10px 5px 10px;
    color: #fff; 
    text-align: center; 
    
    background-size: cover; 
    background-position: bottom; 
    border-radius: 5px;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}
.form-name.spotlight {
    background-image: url('/images/spotlight_bg.png'); 
}
.form-name.watermark {
    background-image: url('/images/watermark_bg.png'); 
}
form#spotlightForm { background: white; padding: 10px 20px 20px 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
#submitContainer, #watermarkContainer {
    display: none;
    margin-top: 10px;
    background: white;
    margin-top: 20px;
    padding: 0 20px 20px 20px;
    border: 1px solid #ddd; 
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
input[type="text"], input[type="number"], textarea, input[type="file"], input[type="email"], input[type="tel"], input[type="url"], select {
    width: 100%; padding: 8px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box;
}
textarea { display: block; margin-bottom: 0; }
label { display: block; font-weight: bold; }
.web-group { position: relative; }
#spotlightForm ul { margin-top: 0; padding-left: 10px; }

/* STYLING */
.bold { font-weight: bold; }
.center_text { text-align: center; }
.required { font-weight: bold; color: red; }
.tip { color:#FF4D2E }
button { background: #007bff; color: white; padding: 10px; border: none; border-radius: 4px; cursor: pointer; margin-top: 5px; width: 100%; font-size: 1rem; }
div.sign-up a:hover, button:hover { background: #0056b3; }
#add-web-btn { background: #6A5ACD; }
#add-web-btn:hover { background: #483D8B; }
#watermark-btn { background: #708090; }
#watermark-btn:hover { background: #696969; }
#watermark-preview { margin-top: 20px; }
#watermarkCancel { background: #198754 }
button:disabled {
    background-color: #cccccc;
    color: #666666;
    border-color: #999999;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}
.button-container { display: flex; gap: 12px; align-items: center; margin-top: 20px;}
/* The red "X" remove button style based on image_0.png */
button.remove-btn {
    background-color: #ff4d4d; /* Red from image */
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    margin-top: 5px;
}

/* The container for all web input items */
#web-container { clear: both; display: flex; flex-direction: column; gap: 10px; }
/* Styling for each new input group */
.web-input-group { display: flex; gap: 5px; align-items: center; }
.completeHeading { 
    color: #007bff; 
    text-align: center; 
    font-size: 1.5em; 
    font-weight: bold; 

}
/* Stle the spotlight text as a highlight feature */
.highlight {
    padding: 12px 20px;
    border-radius: 8px;
    background: linear-gradient(to right, #fff3cd, #fff9e6); /* Soft yellow gradient */
    border-left: 4px solid #ffc107;
    font-weight: 500;
    color: #856404;
    display: block; /* Ensures it takes up the full width */
    margin: 15px 0;
}
.highlight a {
    color: #A52A2A;
    font-weight: bold;
}
.highlight a:visited {
    color: #D2691E;
    font-weight: bold;
}

/* The Loading State */
button.is-loading {
    position: relative;
    color: transparent !important; /* Hides "Apply Now!" */
    cursor: wait;
    pointer-events: none;
    background-color: #4a82b3 !important;
    transition: all 0.3s ease;
}

/* 1. Pulls text from the HTML 'data-loading' attribute */
button.is-loading::before {
    content: attr(data-loading); 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Semi-transparent so the spinner is the focal point */
    color: rgba(255, 255, 255, 0.5) !important; 
    font-size: 14px;
    z-index: 1;
}

/* 2. The Spinner Overlayed in the Center */
button.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px; /* Slightly larger to clear the text height */
    height: 28px;
    margin-top: -14px; /* Half of height */
    margin-left: -14px; /* Half of width */
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 2;
}

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

.story-heading {
    margin-bottom: 5px;
}

.story-describe {
    margin-top: 5px;
}

.facebook-post { 
    position: relative; 
    height: 880px; 
}
img#facebook-post-preview { 
    position: absolute; 
    width: 100%; 
    height: 850px; 
    z-index: 1; 
}
#bioContainer {
    position: absolute; 
    top: 55px;
    left: 20px;
    width: 260px; 
    height: 460px;
    z-index: 2;
    font-family: sans-serif;
    font-size: 1em;
    overflow-y: auto;
}
#bioContainer h3 {
    font-size: 1em;
    margin: 0;
}
#bioContainer div {
    font-size: 1em;
}
#facebook-image-grid {
    position: absolute; 
    top: 530px; 
    left: 5px;
    width: 96.5%;
    z-index: 2;
}

.checkbox-text {
    font-weight: normal;
}
.checkbox-text a {
    text-decoration: none;
}

/* SOCIAL MEDIA */
.social-heading {
    color: #6A5ACD;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}
.social-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  align-items: center;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
}

/* Hover Effects with Brand Colors */
.social-link.facebook:hover {
  background-color: #1877F2;
  color: white;
}

.social-link.instagram:hover {
  background-color: #E4405F;
  color: white;
}

.social-link.pinterest:hover {
  background-color: #BD081C;
  color: white;
}

.social-link.linkedin:hover {
  background-color: #0077B5;
  color: white;
}

/* Subtle lift on hover */
.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ERRORS */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-div.success, .message-div.error {
    animation: slideIn 0.3s ease-out;
}
/* The base container for all messages */
.message-div {
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.5;
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Success State */
.message-div.success {
    display: flex;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Error State */
.message-div.error {
    display: flex;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Optional: Icon sizing */
.message-div svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

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

#progress-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dimmed background */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* MEDIA QUERIES (Desktop) */
@media (min-width: 768px) {
    .top-center-container { width: 800px; }
    .header-divider { height: 20px; }

    h1 { color: #333; font-size: 2.5rem; }
    h2 { color: #333; font-size: 2rem; }
    
    .logo { max-width: 250px; }
    .logo > img { max-width: 250px; }
    .sign-up { text-align: right; }
    .sign-up a { min-width: 20px; min-height: 20px; padding: 5px 5px; }
    .main-container { width: 800px; }

    /* Form elements */
    .form-name { margin: 15px 0 5px 0; }
    .row {
        flex-direction: row;
        align-items: flex-start;
    }
    .col {
        flex: 1;
    }
    #spotlightForm ul { padding-left: 40px; }
    
    /* FACEBOOK POST */
    .facebook-post { 
        height: 1075px; 
    }
    img#facebook-post-preview {
        height: 1075px; 
    }
    #bioContainer {
        width: 670px;
        height: 350px; 
        top: 80px;
        left: 40px;
    }
    #facebook-image-grid {
        top: 420px; 
        left: 7px;
        width: 98%;
    }
}