@use "../constants" as *;
@use "../components/pro-feature-notice";

.alerts {
    padding: 25px;
    border-radius: 5px;
    background-color: $white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-top: 1rem;

    p {
        color: $main-font-color;
        line-height: 1.6;
        font-size: 14px;
        margin-bottom: 0;
    }

    form {
        label {
            display: block;
            margin-bottom: 7px;
            font-weight: 500;
            color: #444;
        }

        input[type="email"] {
            width: 100%;
            max-width: 400px;
            padding: 0 0.75rem;
            border-radius: 0.25rem;
            margin-bottom: 1.25rem;

            &:focus {
                border-color: #80bdff;
                outline: 0;
                box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            }
        }

        #email-recipients-container {
            .email-input-row {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                margin-bottom: 1rem;

                input[type="email"] {
                    flex: 1;
                    margin-bottom: 0;
                    max-width: 350px;
                }

                .add-email-btn,
                .remove-email-btn {
                    width: 30px;
                    height: 30px;
                    padding: 0;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 18px;
                    cursor: pointer;
                    transition: background-color 0.2s;

                    &:hover {
                        opacity: 0.8;
                    }

                    &:disabled {
                        opacity: 0.5;
                        cursor: not-allowed;
                    }
                }
            }
        }

        .text-email-info {
            background: #f0f8ff;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            border-left: 4px solid #0073aa;
            display: none;
        }

        select {
            width: 100%;
            max-width: 400px;
            padding: 0 0.75rem;
            border-radius: 5px;
            background-color: #fff;
            height: 30px;
        }

        select[name="recurrence"] {
            max-width: 388px;
            border-color: #8c8f9436;
            &:hover {
                color: #000;
            }
        }

        .error-levels-container {
            padding: 1rem;
            border: 1px solid #ddd;
            border-radius: 5px;
            background-color: #f9f9f9;

            .form-check {
                margin-bottom: 0.5rem;

                &:last-child {
                    margin-bottom: 0;
                }
            }
        }

        input[type="submit"] {
            display: block;

            &:disabled {
                opacity: 0.65;
                cursor: not-allowed;
            }
        }

        // Loading state styles
        &.loading {
            pointer-events: none;
            opacity: 0.7;

            input,
            select,
            button {
                cursor: wait !important;
            }
        }
    }

    // Next email info styles moved to components/next-schedule-info.scss
    .next-email-info {
        display: none;

        &.active {
            display: block !important;
        }
    }

    .send-test-email {
        display: none;

        label {
            display: flex;
            align-items: center;
            margin-top: 20px;
            gap: 5px;
            input {
                margin-top: 1px;
            }
        }
        .form-check-input:checked {
            background-color: transparent;
        }
    }

    .form-switch {
        display: flex;
        gap: 5px;
        align-items: center;

        input {
            background-repeat: no-repeat;
        }
    }

    // Pro feature styling for error level toggles
    .pro-feature-section {
        .togglers-group {
            &.pro-disabled {
                .log-info-block:not(.pro-preview) {
                    opacity: 0.6;
                    pointer-events: none;
                    position: relative;

                    input, label {
                        cursor: not-allowed;
                    }
                }
                .pro-badge {
                    position: relative !important;
                }


                .pro-preview {
                    border-top: 1px dashed #dee2e6;
                    padding-top: 10px;
                    margin-top: 10px;
                    padding-left: 0;

                    .preview-text {
                        color: #6c757d;
                        font-style: italic;
                        font-size: 14px;
                        display: flex;
                        align-items: center;
                        gap: 8px;

                        i {
                            color: #667eea;
                        }
                    }
                }
            }
        }
    }
}
