/* Reset some default browser styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", system-ui, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background: radial-gradient(
        150% 100% at 50% 100%, 
        hsl(300, 90%, 92%) 5%, 
        hsl(50, 100%, 90%) 30%, 
        hsl(115, 80%, 93%) 50%, 
        hsl(190, 90%, 97%) 100%);
    color: #394660;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
}

#loader-container {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

#loader {
    align-items: center;
    justify-content: center;
    display: inline-block;
    transform: translate(-50%, -50%);
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

.select-all-btn {
    font-size: 0.9em;
    padding: .5rem 1rem;
    width: fit-content;
    cursor: pointer;
    align-items: left;
    display: flex;
  }

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

/* Container styling for a centered layout */
.container {
    min-height: 20rem;
    width: 90%;
    max-width: 500px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 2.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 1.5rem;

    display: flex;
    flex-direction: column;
    /* align-items: center; */
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
}

.contact-container {
    display: none; /* Hidden until contacts are fetched */
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Heading styles */
h1 {
    font-size: 1.8rem;
    line-height: 1.25;
    max-width: 21rem;
    margin: .5rem auto;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Button styles */
button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: #fff;
    background-color: #0d131a;
    border: none;
    border-radius: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #333535;
    color: white;
    -webkit-box-shadow: 0 4px 12px 0 rgba(60, 64, 67, .15);
    box-shadow: 0 4px 12px 0 rgba(60, 64, 67, .15);
}

.google-login-btn {
    background-color: #db4437;
    margin-top: 1rem;
}

.google-login-btn:hover {
    background-color: #c33c28;
}

.import-btn {
    margin-top: 1.5rem;
    width: 100%;
}

/* Contact list styles */
.contacts-list {
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.contact-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.name-container {
    display: flex;
    align-items: center; /* Align checkbox and name vertically centered */
}

.contact-item input[type="checkbox"] {
    margin-right: 10px; /* Space between checkbox and name */
}

.contact-item label {
    font-weight: bold; /* Bold for the name */
}

.birthday {
    font-size: 0.9rem; /* Smaller font size */
    font-style: italic; /* Italic style for birthday */
    color: #555; /* Optional: Different color for better visibility */
    margin-top: 0.25rem; /* Add some space above the birthday */
    margin-left: 22px; /* Align with the checkbox */
}

.birthday-success {
    font-size: 0.9rem; /* Smaller font size */
    font-style: italic; /* Italic style for birthday */
    color: #555; /* Optional: Different color for better visibility */
    margin-top: 0.25rem; /* Add some space above the birthday */
}

.contact-item:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .container {
        padding: 1.5rem;
    }

    button {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Google sign-in style */
.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    /* background-color: WHITE; */
    background-image: none;
    border: 1px solid #a0a0a0;
    -webkit-border-radius: 4px;
    border-radius: 1.5rem;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    /* color: black; */
    cursor: pointer;

    /* font-size: 14px; */
    height: 3rem;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    /* padding: 1rem; */
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    /* max-width: 400px; */
    min-width: min-content;
    display: flex;
    justify-content: center;
  }
  
  .gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 12px;
    min-width: 20px;
    width: 20px;
  }
  
  .gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    /* width: 100%; */
  }
  
  .gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 1;
    flex-grow: 1;

    /* font-weight: 500; */
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
  }
  
  .gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
  
  .gsi-material-button:disabled {
    cursor: default;
    background-color: #ffffff61;
    border-color: #1f1f1f1f;
  }
  
  .gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 38%;
  }
  
  .gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
  }
  
  .gsi-material-button:not(:disabled):active .gsi-material-button-state, 
  .gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: #303030;
    opacity: 12%;
  }
  
  .gsi-material-button:not(:disabled):hover {
    /* -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15); */
    /* box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15); */
    /* background: black; */
    /* color: white; */
  }
  
  .gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: #303030;
    opacity: 8%;
  }