/* Unified shape styling for all views */

/* Color definitions */
:root {
    /* Status colors (now border colors) */
    --color-available: #555555;
    --color-pending: #555555;
    --color-sold: #555555;
    --color-not-available: #555555;
    --color-unknown: #555555;
    
    /* Group colors ORIGINAL
    --color-food: #ffecb3;
    --color-market: #ffd700;     
    --color-food-retail: #95c7ed;
    --color-community: #ece2ce;     
    --color-coffee: #ff6347;          
    --color-if-services-public: #dfa1fa;
    --color-if-services-vendors: #DDDDDD;
    --color-activation: #d9edd3;
    --color-alcoholic-bar: #00853e;
    --color-wine: #00853e; */ 

    --color-food: #ffecb3;
    --color-market: #ffecb3;     
    --color-food-retail: #ffecb3;
    --color-community: #ffecb3;     
    --color-coffee: #ffecb3;          
    --color-if-services-public: #ffecb3;
    --color-if-services-vendors: #DDDDDD;
    --color-activation: #ffecb3;
    --color-alcoholic-bar: #ffecb3;
    --color-wine: #ffecb3;      

    --color1: #ffecb3;
    --color2: #ffd700;    
    --color3: #f39200;
    --color4: #ff6347;    
    --color5: #d5121e; 
    --color6: #ff0000;
    --color7: #00853e;
    --color8: #95c7ed;
    --color9: #ece2ce;

    /* Other styling variables */
    --shape-opacity: 0.7;
    --shape-hover-opacity: 0.9;
    --shape-stroke-width: 2px;
    --shape-outline-width: 2px;
    --shape-outline-color: #ff0000;
    --border-thickness: 1px;
}

/* Base shape styling */
.shape-rect {
    cursor: pointer;
    opacity: var(--shape-opacity);
    transition: opacity 0.2s, stroke-width 0.2s;
    stroke-width: var(--border-thickness);
    stroke: transparent; /* Default transparent stroke */
    stroke-linejoin: round; /* Round the corners of the stroke */
}

/* Fill colors based on group (swapped from status) */
.shape-rect[data-group="activation"] {
    fill: var(--color-activation) !important;
}
.shape-rect[data-group="food"] {
    fill: var(--color-food) !important;
}
.shape-rect[data-group="alcoholic-bar"] {
    fill: var(--color-alcoholic-bar) !important;
}
.shape-rect[data-group="wine"] {
    fill: var(--color-wine) !important;
}
.shape-rect[data-group="coffee"] {
    fill: var(--color-coffee) !important;
}
.shape-rect[data-group="food-retail"] {
    fill: var(--color-food-retail) !important;
}
.shape-rect[data-group="if-services-public"] {
    fill: var(--color-if-services-public) !important;
}
.shape-rect[data-group="market"] {
    fill: var(--color-market) !important;
}
.shape-rect[data-group="if-services-vendors"] {
    fill: var(--color-if-services-vendors) !important;
}
.shape-rect[data-group="community"] {
    fill: var(--color-community) !important;
}

/* Border colors based on status (swapped from group) */
.shape-rect[data-status="available"] {
    stroke: var(--color-available);
}
.shape-rect[data-status="pending"] {
    stroke: var(--color-pending);
}
.shape-rect[data-status="sold"] {
    stroke: var(--color-sold);
}
.shape-rect[data-status="not-available"] {
    stroke: var(--color-not-available);
}

/* Special rule for Activation group - always use red dotted border regardless of status */
.shape-rect[data-group="activation"] {
    stroke: #f70606 !important;
    stroke-dasharray: 5,5 !important;
    stroke-width: 5px !important;
}

/* Exception rules commented out - all borders are now dark grey except activation group */
/* 
.shape-rect[data-status="not-available"][data-group="food"] {
    stroke: var(--color-food);
}
.shape-rect[data-status="not-available"][data-group="alcoholic-bar"] {
    stroke: var(--color-alcoholic-bar);
}
.shape-rect[data-status="not-available"][data-group="wine"] {
    stroke: var(--color-wine);
}
.shape-rect[data-status="not-available"][data-group="coffee"] {
    stroke: var(--color-coffee);
}
.shape-rect[data-status="not-available"][data-group="food-retail"] {
    stroke: var(--color-food-retail);
}
.shape-rect[data-status="not-available"][data-group="if-services-public"] {
    stroke: var(--color-if-services-public);
}
.shape-rect[data-status="not-available"][data-group="market"] {
    stroke: var(--color-market);
}
.shape-rect[data-status="not-available"][data-group="if-services-vendors"] {
    stroke: var(--color-if-services-vendors);
}
.shape-rect[data-status="not-available"][data-group="community"] {
    stroke: var(--color-community);
}

.shape-rect[data-status="sold"][data-group="food"] {
    stroke: var(--color-food);
}
.shape-rect[data-status="sold"][data-group="alcoholic-bar"] {
    stroke: var(--color-alcoholic-bar);
}
.shape-rect[data-status="sold"][data-group="wine"] {
    stroke: var(--color-wine);
}
.shape-rect[data-status="sold"][data-group="coffee"] {
    stroke: var(--color-coffee);
}
.shape-rect[data-status="sold"][data-group="food-retail"] {
    stroke: var(--color-food-retail);
}
.shape-rect[data-status="sold"][data-group="if-services-public"] {
    stroke: var(--color-if-services-public);
}
.shape-rect[data-status="sold"][data-group="market"] {
    stroke: var(--color-market);
}
.shape-rect[data-status="sold"][data-group="if-services-vendors"] {
    stroke: var(--color-if-services-vendors);
}
.shape-rect[data-status="sold"][data-group="community"] {
    stroke: var(--color-community);
}
*/

/* Hover state */
.shape-rect:hover {
    opacity: var(--shape-hover-opacity);
    stroke: #fff;
    stroke-width: calc(var(--border-thickness) + 2px);
    stroke-dasharray: 5,5;
}

/* Selected state */
.shape-rect.selected {
    stroke-width: calc(var(--border-thickness) + 3px);
    stroke-dasharray: 5,5;
    opacity: 1;
    outline: var(--shape-outline-width) solid var(--shape-outline-color);
    outline-offset: 1px;
}

/* Dragging state */
.shape-rect.dragging {
    opacity: 0.8;
    stroke-width: calc(var(--border-thickness) + 3px);
    stroke-dasharray: 5,5;
    cursor: move;
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.5));
} 