/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
}

.content-container {
    min-height: 100vh;
}

.site-logo {
    margin-top: 48px;
    margin-left: 96px;
    width: 240px;
    height: auto;
}

.page-heading {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: #1A255D;
    margin-top: 12px;
    margin-bottom: 8px;
}

.step-indicator {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 400;
    color: #030609;
}

.description {
    text-align: center;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 400;
    color: #030609;
}

.btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
}

.btn-primary, .btn-secondary {
    width: 250px;
    height: 60px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border: 4px solid #FF1B26;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: #FF1B26;
    color: white;
}

.btn-primary:hover {
    background-color: #cc151f;
}

.btn-secondary {
    background-color: #ffffff;
    color: #FF1B26;
}

.btn-secondary:hover {
    background-color: #dfdfdf;
}

.footer-design {
    padding: 40px 60px;
    font-family: 'Poppins', sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    gap: 40px;
}

/* LEFT */
.footer-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 20px;
}

.footer-left .logo svg {
    width: 200px;
    height: auto;
}

.tagline {
    margin: 10px 0 20px;
    color: #666;
}

.socials a svg {
    width: 36px;
    height: auto;
    margin-right: 8px;
    transition: opacity 0.3s;
}

.socials a img:hover {
    opacity: 0.6;
}

/* CENTER */
.footer-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.footer-center a {
    text-decoration: none;
    color: #000;
}

.footer-center a:hover {
    text-decoration: underline;
}

/* RIGHT */
.footer-right a {
    text-decoration: none;
    color: #000;
}

.footer-right a:hover {
    text-decoration: underline;
}

.footer-right p {
    color: #666;
    line-height: 1.5;
}

/* 📱 Responsive */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-left .logo {
        justify-content: center;
    }

    .socials {
        justify-content: center;
    }
}

/* Flash messages */
.flash-message {
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 800px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.flash-message.notice {
    background-color: #16a34a;
    color: #f0f0f0;
}

.flash-message.alert {
    background-color: #e21526;
    color: #f0f0f0;
}

.flash-message p {
    margin:0;
}

/* Calendar selection page */
.calendar-selection-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.connected-account-card {
    background: #eff5ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.connected-account-card h3 {
    font-size: 24px;
    margin-top: 0;
}

.calendar-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 3px solid #c2c2c2;
}

.calendar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-card-header h3 {
    font-size: 24px;
    margin: 0;
}

.refresh-button-form {
    display: inline-block;
    margin: 0;
}

.refresh-calendar-btn {
    background: #1a255d;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.refresh-calendar-btn:hover {
    background: #5a55a1;
}

.calendar-list {
    background: #eff5ff;
}

.calendar-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.calendar-item:hover {
    background-color: #dbe9ff;
}

.calendar-item-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

.calendar-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.calendar-item-name {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}

.calendar-item-timezone {
    color: #666;
    font-size: 14px;
}

.calendar-selection-form-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn-continue {
    background: #1a255d;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-continue:hover {
    background: #5a55a1;
}

.btn-cancel {
    background: #a3a3a3;
    color: white;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel:hover {
    background: #7a7a7a;
}

.no-calendars {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
}

.no-calendars-text {
    color: #666;
    font-size: 16px;
}

.btn-back {
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
}

/* Sync status indicator (below page heading) */
.sync-status-indicator {
    text-align: center;
    margin: 12px 0 20px;
}

.sync-check-icon {
    width: 144px;
    height: 144px;
}

.sync-fail-icon {
    width: 144px;
    height: 144px;
}

.spinner {
    --spinner-size: 144px;
    --spinner-color: #1A255D;
    --spinner-bar-width: 12px;
    --spinner-bar-height: 40px;
    --spinner-speed: 1.2s;
  
    position: relative;
    display: inline-block;
    width: var(--spinner-size);
    height: var(--spinner-size);
    background: white;
}
  
.spinner div {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--spinner-bar-width);
    height: var(--spinner-bar-height);
    margin-left: calc(var(--spinner-bar-width) / -2);
    margin-top: calc((var(--spinner-size) * -0.5) + 4px);
    background: var(--spinner-color);
    border-radius: 999px;
    transform-origin: center calc((var(--spinner-size) / 2) - 4px);
    animation: spinner-fade var(--spinner-speed) linear infinite;
}
  
.spinner div:nth-child(1)  { transform: rotate(0deg);   animation-delay: calc(var(--spinner-speed) * -11 / 12); }
.spinner div:nth-child(2)  { transform: rotate(30deg);  animation-delay: calc(var(--spinner-speed) * -10 / 12); }
.spinner div:nth-child(3)  { transform: rotate(60deg);  animation-delay: calc(var(--spinner-speed) * -9 / 12); }
.spinner div:nth-child(4)  { transform: rotate(90deg);  animation-delay: calc(var(--spinner-speed) * -8 / 12); }
.spinner div:nth-child(5)  { transform: rotate(120deg); animation-delay: calc(var(--spinner-speed) * -7 / 12); }
.spinner div:nth-child(6)  { transform: rotate(150deg); animation-delay: calc(var(--spinner-speed) * -6 / 12); }
.spinner div:nth-child(7)  { transform: rotate(180deg); animation-delay: calc(var(--spinner-speed) * -5 / 12); }
.spinner div:nth-child(8)  { transform: rotate(210deg); animation-delay: calc(var(--spinner-speed) * -4 / 12); }
.spinner div:nth-child(9)  { transform: rotate(240deg); animation-delay: calc(var(--spinner-speed) * -3 / 12); }
.spinner div:nth-child(10) { transform: rotate(270deg); animation-delay: calc(var(--spinner-speed) * -2 / 12); }
.spinner div:nth-child(11) { transform: rotate(300deg); animation-delay: calc(var(--spinner-speed) * -1 / 12); }
.spinner div:nth-child(12) { transform: rotate(330deg); animation-delay: calc(var(--spinner-speed) * 0 / 12); }

@keyframes spinner-fade {
    0%   { opacity: 1; }
    100% { opacity: 0.12; }
}

#back-home-button {
    display: flex;
    justify-content: center;
}

.btn-home {
    background: #ff1b26;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
}

.btn-home:hover {
    background: #cc151f;
}

/* How It Works section */
.how-it-works {
    max-width: 900px;
    margin: 60px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.hiw-features {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hiw-feature-card {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    background: #eff5ff;
    border-radius: 12px;
    padding: 28px 24px;
}

.hiw-feature-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A255D;
    margin: 0 0 12px;
}

.hiw-feature-text {
    font-size: 15px;
    font-weight: 400;
    color: #030609;
    margin: 0;
    line-height: 1.6;
}

.hiw-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
    gap: 8px;
}

.hiw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 160px;
}

.hiw-step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #FF1B26;
    color: white;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hiw-step-label {
    font-size: 15px;
    font-weight: 500;
    color: #1A255D;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.hiw-step-connector {
    width: 60px;
    height: 3px;
    background-color: #FF1B26;
    border-radius: 2px;
    flex-shrink: 0;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .hiw-features {
        flex-direction: column;
        align-items: center;
    }

    .hiw-step-connector {
        width: 3px;
        height: 32px;
        margin-bottom: 0;
    }

    .hiw-steps {
        flex-direction: column;
    }
}