/* Alert Styles - Extracted from style.css */

/******** Alert Dialog **************/




.prompt-content {
    background: #f0f7ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}



.alert-message {
    color: #4a4a4a;
    line-height: 1.5;
    flex-grow: 1;
    font-size: 0.95rem;
    margin-right: 1.5rem;
}



.prompt-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.btn-signup, .btn-login {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 160px;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-signup {
    background: linear-gradient(to bottom, #ff9520, #ff8c00);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.2);
}

.btn-login {
    background: white;
    color: #ff8c00;
    border: 1px solid #ff8c00;
}

.btn-signup:hover {
    background: linear-gradient(to bottom, #ff8c00, #e67e00);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}

.btn-login:hover {
    background: #fff5e6;
    transform: translateY(-1px);
}

.prompt-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

@media (max-width: 480px) {
    .prompt-dialog {
        width: 95%;
        margin: 1rem;
        padding: 1rem;
    }

    .alert-title {
        font-size: 1.1rem;
    }

    .alert-message {
        font-size: 0.9rem;
    }
}




/***** Alert Component CSS **************/

.custom-alert {
    position: relative; /* Ensure positioning context */
    z-index: 1;
    border: 1px solid #cce5ff;
    background-color: #e6f3ff; /* Light blue background */
    color: #004085; /* Darker blue text */
    animation: slideInFromTop 0.3s ease-out;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.05);
    max-width: 100%; /* Ensure it doesn't exceed container */
    width: 100%; /* Responsive width */
    margin: 24px auto 0;
}


/* Scoped alert header */
.custom-alert .alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Distribute space between items */
    font-size: 1rem;
    font-weight: bold;
    color: #004085;
    position: relative; /* For absolute positioning of close button */
}



/* Alert Message */
.custom-alert .alert-message {
    flex-grow: 1;
    margin-right: 15px;
    color: #4a4a4a; /* Darker text for readability */
    line-height: 1.5;
    word-wrap: break-word; /* Allow long words to break */
}

/* Scoped alert icon */
.custom-alert .alert-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* Scoped close button */
.custom-alert .btn-close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 24px !important;
    height: 24px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    color: #999 !important;
    cursor: pointer !important;
    transition: color 0.2s ease, background-color 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    z-index: 1100 !important; /* Ensure it sits above other content */
}

.custom-alert .btn-close:hover {
    color: #666;
    background-color: rgba(255, 255, 255, 0.5);
}

.custom-alert .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Responsive styles */
@media (min-width: 1200px) {
    .custom-alert {
        width: 100%; /* Adjust as needed */
        max-width: 1200px; /* Match container's max-width */
    }
}

@media (max-width: 768px) {
    .custom-alert {
        width: 100%;
        padding: 20px;
    }

    .custom-alert .alert-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-alert .alert-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .custom-alert .alert-message {
        margin-right: 0;
    }


}


@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.targets-update {
    margin-top: 0.5rem;
}

.targets-update ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.targets-update ul li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.targets-update ul li i {
    margin-right: 0.5rem;
    flex-shrink: 0;
}


.custom-alert i {
    flex-shrink: 0; /* Prevent the icon from resizing */
    font-size: 1.5rem; /* Adjust the icon size */
    margin-right: 10px; /* Add space between icon and text */
}

.custom-alert span {
    text-align: left;
    flex-grow: 1; /* Allow the text to take up the remaining space */
}

.custom-alert.alert-info {
    background-color: #f0f7ff;
    color: #014361;
    border-left: 4px solid #0091ff;
}

.custom-alert.alert-warning {
    background-color: #fff8ed;
    color: #663c00;
    border-left: 4px solid #ff9500;
}

.custom-alert.alert-success {
    background-color: #f0fdf4;
    color: #1e4620;
    border-left: 4px solid #34c759;
}

.custom-alert.alert-danger {
    background-color: #fef2f2;
    color: #5f2120;
    border-left: 4px solid #ff3b30;
}

.custom-alert.alert-saving {
    background-color: #f0f7ff;
    color: #014361;
    border-left: 4px solid #0091ff;
}


/* Spinner styles */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.spin {
    animation: spin 1s linear infinite;
}

.spinner-border {
    margin-right: 10px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .custom-alert {
        width: 100%;
        padding: 16px;
    }

    .custom-alert .alert-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-alert .alert-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .custom-alert .alert-message {
        margin-right: 0;
        margin-bottom: 10px;
    }

}


/*********************************/
/* Start Account Creation Prompt */
/*********************************/
/* Dialog specific styles */
.prompt-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.alert-dialog {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    color: #333;
    font-size: 1.25rem;
}

.btn-close:hover {
    opacity: 0.75;
}


.btn-close {
    transition: opacity 0.15s ease-in-out;
}



.alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #004085;
}
.alert-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.alert-close:hover {
    color: #666;
}

.alert-footer {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.alert-button {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 8px 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-button:hover {
    background-color: #e67e00;
}

@media (max-width: 480px) {
    .alert-dialog {
        width: 95%;
        margin: 10px;
        padding: 1rem;  /* Updated padding */
    }

    .alert-header h4 {
        font-size: 1.1rem;
    }

    .alert-message {
        font-size: 0.9rem;
    }
}

.prompt-dialog {
    background: white;
    width: 440px;
    border-radius: 8px; /* Slightly more rounded corners */
    padding: 24px; /* More breathing room */
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15); /* Softer shadow */
    animation: dialogFadeIn 0.2s ease-out; /* Smooth entrance */
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prompt-dialog .prompt-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    text-align: center;
}

/* Embedded version styles */
.account-prompt {
    background: linear-gradient(to right, #f0f7ff, #f8fbff); /* Subtle gradient */
    padding: 24px;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid rgba(0, 102, 204, 0.1);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.05);
}

.account-prompt .prompt-buttons {
    justify-content: center;
}

/* Shared content styles */
.prompt-text {
    font-size: 15px;
    line-height: 1.4;
    color: #333;
}

.prompt-text p {
    margin: 0 0 12px 0;
}

.prompt-text p:last-child {
    margin-bottom: 0;
}

.prompt-secondary {
    color: #0066cc !important;
}

/* Button styles */
.btn-login i, .btn-signup i {
    font-size: 16px;
}

.btn-skip {
    display: block;
    width: fit-content;
    margin: 0 auto;
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    text-align: center;
}

/* Hover states */

.btn-skip:hover {
    color: #333;
}

/* Responsive improvements */
@media (max-width: 480px) {
    .prompt-dialog {
        width: 90%;
        margin: 16px;
        padding: 16px;
    }

    .prompt-buttons {
        flex-direction: column;
    }

    .btn-login, .btn-signup {
        width: 100%;
        min-width: unset;

    }
}

/* END Account Creation Prompt */
