/* ==================================================
   BUTTON INITIALIZATION
================================================== */

/* Base Button Style */
.btn {
    font-size: 0.85em;
    margin: 0;
    padding: 6px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    height: 32px;
    min-width: 140px;
    width: auto;
    gap: 8px;
    white-space: nowrap;
}

.btn i {
    margin: 0;
}

.btn-gap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* BUTTON FOR TOOLBAR */

.btn-flex {
    min-width: auto !important;
    width: 100% !important;
    padding: 6px 30px;
}

.btn-submit {
    background-color: #4ea5f2;
    color: white;
}

.btn-next {
    background-color: #4ea5f2;
    color: white;
}

/* This is the container that colds the card tool buttons */
.button-container {
    display: flex; /* Enable flexbox */
    justify-content: flex-end; /* Align buttons to the left */
    gap: 1%; /* Add 1% gap between the buttons */
    background-color: #fff;
}

.button-container-email {
    display: flex; /* Enable flexbox */
    justify-content: flex-end; /* Align buttons to the left */
    gap: 1%; /* Add 1% gap between the buttons */
    background-color: #fff;
}

.image-control button {
    display: flex;
    font-size: 0.85em;
    margin: 0;
    background-color: #48ba17;
    color: #fff;
    border: none;
    padding: 10px 20px;
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    cursor: pointer;
    border-radius: 5px;
    width: 125px;
}

/* ==================================================
   GLOBAL BUTTON STYLES
================================================== */

/* Base Button Style */
.btn {
    font-size: 0.85em;
    margin: 0;
    padding: 6px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    height: 32px;
    min-width: 140px;
    width: auto;
    gap: 8px;
    white-space: nowrap;
}

.btn i {
    margin: 0;
}

/* Global Link Style */
a {
    color: #4ea5f2;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #3a8bd9;
    text-decoration: none;
}

/* Button Variants */
.btn-primary {
    background-color: #4ea5f2;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #3a8bd9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
    color: #fff;
}

.btn-primary-flex {
    background-color: #4ea5f2;
    color: white;
    border: none;
    min-width: auto !important;
    width: 100% !important;
    padding: 6px 30px;
}

.btn-primary-flex:hover {
    background-color: #3a8bd9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.btn-secondary {
    background-color: white;
    color: #4ea5f2;
    border: 1px solid #4ea5f2;
}

.btn-secondary:hover {
    background-color: rgba(78, 165, 242, 0.1);
    color: #4ea5f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.1);
}

.btn-secondary-flex {
    background-color: white;
    color: #4ea5f2;
    border: 1px solid #4ea5f2;
    min-width: auto !important;
    width: 100% !important;
    padding: 6px 30px;
}

.btn-secondary-flex:hover {
    background-color: rgba(78, 165, 242, 0.1);
    color: #4ea5f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.1);
}

.btn-success {
    background-color: #65c97a;
    color: white;
}

.btn-success:hover {
    background-color: #4ea5f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.btn-success-flex {
    background-color: #65c97a;
    color: white;
    min-width: auto !important;
    width: auto !important;
    padding: 6px 30px;
}

.btn-success-flex:hover {
    background-color: #4ea5f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

/* Button Sizes */
.btn-sm {
    height: 28px;
    min-width: 100px;
    font-size: 0.75em;
    padding: 4px 8px;
}

.btn-sm-flex {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 140px;
}

.btn-sm-flex i {
    margin-right: 8px;
}

.btn-lg {
    height: 40px;
    min-width: 160px;
    font-size: 1em;
    padding: 8px 16px;
}

/* Button Layout */
.btn-flex {
    min-width: auto !important;
    width: auto !important;
    padding: 6px 30px;
}

.btn-gap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Button Containers */
.button-container,
.button-container-email {
    display: flex;
    justify-content: center;
    gap: 1%;
    background-color: #fff;
}

/* Button States */
.btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    border: none;
}

/* Button Group */
.button-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* Special Buttons */
.btn-apply {
    display: flex;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    align-items: center;
    margin: 1em auto 0 auto;
    width: 70%;
    padding: 10px 20px;
    background-color: #99a2ac;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    text-align: center;
}

.btn-apply:hover {
    background-color: #ccc;
    color: #000;
}

.btn-apply-flex {
    display: flex;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    align-items: center;
    margin: 1em auto 0 auto;
    min-width: auto !important;
    width: auto !important;
    padding: 6px 30px;
    background-color: #99a2ac;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    text-align: center;
}

.btn-apply-flex:hover {
    background-color: #ccc;
    color: #000;
}

.btn-remove {
    display: flex;
    justify-content: center;
    font-weight: 500;
    text-transform: uppercase;
    width: 100%;
    padding: 6px;
    background-color: #5adafa;
    color: #fff;
    border: none;
    cursor: pointer;
}


/* ////////// MENU BUTTON ////////// */

a {
    text-decoration: none;
}

/* BUTTON APPLY STYLE */

.btn-apply {
    display: flex;
    justify-content: center;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    align-items: center;
    margin: 1em auto 0 auto;
    width: 70%;
    padding: 10px 20px;
    background-color: #99a2ac;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    text-align: center;
}

.btn-apply:hover,
.btn-apply:focus,
.btn-apply:active {
    background-color: #ccc;
    color: #000;
}

.btn-change {
    display: flex;
    justify-content: center;
    font-weight: 500;
    text-transform: uppercase;
    width:100%;
    padding: 6px;
    background-color: #5adafa;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
    text-align: center;
    gap: 8px;
}

.btn-change:hover,
.btn-change:focus,
.btn-change:active {
    background-color: #ccc;
    color: #000;
}

/* BUTTON DROPDOWN MENU STYLE */

.btn-drop {
    font-family: 'Manrope', serif;
    width: 100%;
    padding: 10px 0;
    background-color: #0056b3;
    color: white;
    margin-bottom: 0;
}

.btn-drop-upload-img {
    font-family: 'Manrope', serif;
    width: 100%;
    padding: 10px 20px;
    background-color: #10c422;
    color: white;
    margin-bottom: 10px;
}

.dropdown {
    position: relative;
    display: block; /* Ensure the dropdown takes up the full width available */
    /* width: 100%; */
}

.dropdown-content button {
    color: black;
    padding: 12px 16px;
    background-color: #f9f9f9;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    text-transform: none;
}

.dropdown-content button:nth-child(2n) {
    background-color: #f2f2f2;
}

.dropdown-content button:hover,
.dropdown-content button:focus {
    background-color: #ddd;
    color: #0056b3;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    padding: 10px;
}

.dropdown:hover .dropdown-content {
    display: block;
}



.btn-save {
    background-color: #4ea5f2;
    color: white;
}

.btn-save:hover {
    background-color: #3a8bd9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.btn-save-flex {
    background-color: #4ea5f2;
    color: white;
    min-width: auto !important;
    width: auto !important;
    padding: 6px 30px;
}

.btn-save-flex:hover {
    background-color: #3a8bd9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.inset-link {
    color: #4ea5f2 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.inset-link:hover {
    color: #4ea5f2 !important;
    text-decoration: none !important;
    opacity: 0.8;
}

.btn-flex.btn-primary:hover {
    background-color: #3a8bd9;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.delete-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #fff;
    color: #3a8bd9;
    border: 1px solid #3a8bd9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background-color: #3a8bd9;
    color: #fff;
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

/* Analytics Campaign Buttons */
.analytic-campaign-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.analytic-campaign-buttons .btn {
    min-width: 160px;
    height: 36px;
    font-size: 0.9em;
}

.analytic-campaign-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

/* Toolbar Button Styles */
.campaign-name-prompt .btn-primary,
.campaign-name-prompt .btn-secondary,
.campaign-name-prompt .btn-primary-flex,
.campaign-name-prompt .btn-secondary-flex {
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    height: 32px;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.campaign-name-prompt .btn-primary,
.campaign-name-prompt .btn-primary-flex {
    background-color: #4ea5f2;
    color: white;
    border: none;
}

.campaign-name-prompt .btn-primary:hover,
.campaign-name-prompt .btn-primary-flex:hover {
    background-color: #3a8bd9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.campaign-name-prompt .btn-secondary,
.campaign-name-prompt .btn-secondary-flex {
    background-color: white;
    color: #4ea5f2;
    border: 1px solid #4ea5f2;
}

.campaign-name-prompt .btn-secondary:hover,
.campaign-name-prompt .btn-secondary-flex:hover {
    background-color: rgba(78, 165, 242, 0.1);
    color: #4ea5f2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.1);
}

/* Remove any conflicting hover styles */
.campaign-name-prompt .btn:hover {
    background-color: #4ea5f2;
    color: white;
}

/* Consistent hover effects for all buttons */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

.btn-flex:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(78, 165, 242, 0.2);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* ========== Medium screens (≤1365px) ========== */
@media (max-width: 1365px) {
    /* Base Button Scaling */
    .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
        min-width: 130px;
        gap: 6px;
    }
    
    /* Button Variants */
    .btn-primary,
    .btn-primary-flex,
    .btn-next,
    .btn-submit,
    .btn-save,
    .btn-save-flex {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
        min-width: 130px;
    }
    
    .btn-secondary,
    .btn-secondary-flex {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
        min-width: 130px;
    }
    
    .btn-success,
    .btn-success-flex {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
        min-width: 130px;
    }
    
    /* Button Sizes */
    .btn-sm,
    .btn-sm-flex {
        height: 26px;
        min-width: 90px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .btn-lg {
        height: 36px;
        min-width: 150px;
        font-size: 0.9rem;
        padding: 7px 14px;
    }
    
    /* Special Buttons */
    .btn-apply,
    .btn-apply-flex {
        font-size: 0.8rem;
        padding: 8px 16px;
        height: 36px;
    }
    
    .btn-change {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
        gap: 6px;
    }
    
    .btn-remove {
        font-size: 0.8rem;
        padding: 5px 10px;
        height: 30px;
    }
    
    /* Dropdown Buttons */
    .btn-drop,
    .btn-drop-upload-img {
        font-size: 0.8rem;
        padding: 8px 16px;
        height: 36px;
    }
    
    /* Image Control Buttons */
    .image-control button {
        font-size: 0.8rem;
        padding: 8px 16px;
        height: 36px;
        width: 115px;
    }
    
    /* Analytics Campaign Buttons */
    .analytic-campaign-buttons .btn {
        min-width: 150px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    /* Delete Buttons */
    .delete-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
    
    /* Button Containers */
    .button-container,
    .button-container-email {
        gap: 0.8%;
    }
    
    /* Button Groups */
    .button-group {
        gap: 6px;
    }
    
    /* Button Gaps */
    .btn-gap {
        gap: 0.4rem;
    }
}

/* ========== Small screens (≤900px) ========== */
@media (max-width: 900px) {
    /* Base Button Scaling */
    .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
        min-width: 120px;
        gap: 5px;
    }
    
    /* Button Variants */
    .btn-primary,
    .btn-primary-flex,
    .btn-next,
    .btn-submit,
    .btn-save,
    .btn-save-flex {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
        min-width: 120px;
    }
    
    .btn-secondary,
    .btn-secondary-flex {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
        min-width: 120px;
    }
    
    .btn-success,
    .btn-success-flex {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
        min-width: 120px;
    }
    
    /* Button Sizes */
    .btn-sm,
    .btn-sm-flex {
        height: 24px;
        min-width: 80px;
        font-size: 0.65rem;
        padding: 2px 4px;
    }
    
    .btn-lg {
        height: 32px;
        min-width: 140px;
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    /* Special Buttons */
    .btn-apply,
    .btn-apply-flex {
        font-size: 0.75rem;
        padding: 6px 12px;
        height: 32px;
    }
    
    .btn-change {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
        gap: 5px;
    }
    
    .btn-remove {
        font-size: 0.75rem;
        padding: 4px 8px;
        height: 28px;
    }
    
    /* Dropdown Buttons */
    .btn-drop,
    .btn-drop-upload-img {
        font-size: 0.75rem;
        padding: 6px 12px;
        height: 32px;
    }
    
    /* Image Control Buttons */
    .image-control button {
        font-size: 0.75rem;
        padding: 6px 12px;
        height: 32px;
        width: 105px;
    }
    
    /* Analytics Campaign Buttons */
    .analytic-campaign-buttons .btn {
        min-width: 140px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* Delete Buttons */
    .delete-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    
    /* Button Containers */
    .button-container,
    .button-container-email {
        gap: 0.6%;
    }
    
    /* Button Groups */
    .button-group {
        gap: 5px;
    }
    
    /* Button Gaps */
    .btn-gap {
        gap: 0.3rem;
    }
    
    /* Responsive button layout for smaller screens */
    .button-container,
    .button-container-email {
        flex-direction: column;
        gap: 8px;
    }
    
    .button-container .btn,
    .button-container-email .btn {
        width: 100%;
        min-width: auto;
    }
    
    .analytic-campaign-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .analytic-campaign-buttons .btn {
        width: 100%;
        min-width: auto;
    }
}