/* General Page Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f3f2f1; /* Outlook-style light grey */
    color: #323130;
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 { color: #0078d4; } /* Outlook Blue */

/* Layout Container */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 40px;
}

/* Workspace (Top) */
.preview-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Asset Tray (Bottom) */
.icon-explorer {
    width: 100%;
    background: #faf9f8 !important;
    padding: 30px;
    border-radius: 12px !important;
    border: 1px solid #edebe9 !important;
}

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

.filter-controls {
    display: flex;
    gap: 10px;
    flex-grow: 1;
    justify-content: flex-end;
}

#icon-search { width: 300px; padding: 10px; border-radius: 6px; border: 1px solid #d1d1d1; }
#category-select { padding: 10px; border-radius: 6px; border: 1px solid #d1d1d1; }

/* The Expansive Grid */
#icon-grid {
    display: grid;
    /* Forces many icons per row */
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1dfdd;
}

.icon-item {
    font-size: 28px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.icon-item:hover {
    background-color: #0078d4;
    color: white;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0,120,212,0.3);
}

.count-badge {
    font-size: 14px;
    background: #0078d4;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
}

/* Center and style the icon display in the workspace */
#icon-display {
    background-color: #f3f2f1; /* Light grey circle background */
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Makes it a circle */
    margin: 0 auto 20px auto; /* Centers it horizontally */
    border: 2px solid #edebe9;
    transition: transform 0.2s ease;
}

#icon-display:hover {
    transform: scale(1.05) !important; /* Slight pop when hovering the template icon */
    background-color: #e1dfdd;
}

#current-icon {
    line-height: 1;
    cursor: default;
}

/* Center and Style the Icon Display */
#icon-display-circle {
    margin: 0 auto; /* Horizontal centering */
    display: flex !important; /* Web display (Outlook uses table-cell above) */
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s !important;
    cursor: default;
}

@keyframes iconPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); } /* Grows large */
    100% { transform: scale(1); } /* Returns to normal */
}

/* The Class JavaScript adds/removes */
.pop-effect {
    animation: iconPop 0.3s ease-out !important;
    color: #0078d4 !important; /* Optional: flashes Outlook blue during the pop */
}

/* Your existing hover (keep this too!) */
#icon-display-circle:hover {
    transform: scale(1.45);
    background-color: #edebe9;
    transition: transform 0.2s ease;
}

/* Ensure the Copy Button stands out under the workspace */
#copy-btn {
    margin-top: 30px;
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 120, 212, 0.2);
}

#copy-btn:hover {
    background-color: #005a9e;
    box-shadow: 0 6px 15px rgba(0, 120, 212, 0.3);
}

.status-bar {
    margin-top: 15px;
    font-size: 14px;
    color: #605e5c;
    font-weight: 600;
    background: #f3f2f1;
    padding: 5px 15px;
    border-radius: 20px;
}

/* Optional: Turn the text red if they go over a limit */
.limit-reached {
    color: #d83b01 !important; /* Outlook Error Red */
    animation: shake 0.2s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    50% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.toast-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #e1f5fe; /* Light blue background */
    border-left: 5px solid #0078d4; /* Outlook blue stripe */
    color: #004a77;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn 0.5s ease-in-out;
}

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

.main-container {
    width: 95%;          /* Occupy most of the screen width */
    max-width: 1200px;   /* But don't let it get ridiculously wide */
    margin: 0 auto;      /* Keep it centered */
}

.template-btn {

    border-radius: 5px !important; 
    background: #ffffff !important;
    padding: 2px 4px !important;
    font-size: 11px !important;
    border: 1px solid #d1d1d1 !important;
    

}
.template-btn:hover {
    transform: scale(1.05) !important;
    transition: transform 0.2s ease;
    background: #faf9f8 !important;
    }

