/* Widget Styles */
.widget {
    position: absolute;
    resize: none;
    border-radius: 15px;
    width: 270px;
    min-width: 150px;
    min-height: 100px;
    background-color: rgba(var(--widget-color, rgb(0, 0, 0)), 0.2);
    backdrop-filter: blur(5px);
    color: var(--text-color, white);
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    display: none;
    top: 50px;
    left: 50px;
    z-index: 100;
    align-items: normal;
    justify-content: center;
    overflow: hidden; /* Prevents content overflow */
    transition: background-color 0.3s ease;
}

/* Widget header */
.widget-header {
    color: var(--text-color, white);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    background-color: rgba(var(--widget-color, rgb(0, 0, 0)), var(--header-opacity, 0.1));
    font-size: 30px;
    padding: 10px;
    cursor: grab;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.widget-header:active {
    cursor: grabbing;
}

.widget-header h1 {
    font-size: 30px;
    font-weight: normal;
    margin: 0;
    justify-self: left;
    align-self: center;;
}

.widget-header button {
    width: 100px;
    padding: 8px 3px;
    background: rgba(var(--button-color, 0, 0, 0), 0.2);
    border: none;
    border-radius: 10px;
    color: var(--text-color, #fff);
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-family: 'Bahnschrift', sans-serif; 
}

.widget-header button:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.widget-header button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: nwse-resize;
}

/* Positioning the handles */
.resize-handle.bottom-right { bottom: 0; right: 0; cursor: nwse-resize; }
.resize-handle.bottom-left { bottom: 0; left: 0; cursor: nesw-resize; }
.resize-handle.top-right { top: 0; right: 0; cursor: nesw-resize; }
.resize-handle.top-left { top: 0; left: 0; cursor: nwse-resize; }
.resize-handle.right { top: 50%; right: 0; transform: translateY(-50%); cursor: ew-resize; width: 5px; height: 100%; }
.resize-handle.left { top: 50%; left: 0; transform: translateY(-50%); cursor: ew-resize; width: 5px; height: 100%; }
.resize-handle.bottom { bottom: 0; left: 50%; transform: translateX(-50%); cursor: ns-resize; width: 100%; height: 5px; }
.resize-handle.top { top: 0; left: 50%; transform: translateX(-50%); cursor: ns-resize; width: 100%; height: 5px; }
