/********* FLOATING BUTTON **********/

.wriwoods-goals-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--wriwoods-primary-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wriwoods-goals-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

/* Responsive positioning */
@media (max-width: 768px) {
    .wriwoods-goals-float {
        bottom: 20px; /* lower on small screens */
        right: 20px;
    }
}

/* Icon inside the button */
.wriwoods-goals-icon {
    font-size: 24px;
}

/* Tooltip text */
.wriwoods-goals-tooltip {
    position: absolute;
    bottom: 75px;
    right: 50%;
    transform: translateX(50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.wriwoods-goals-float:hover .wriwoods-goals-tooltip {
    opacity: 1;
}


/********* MODAL **********/

/* Modal Overlay */
.wriwoods-goals-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

/* Modal Content Box */
.wriwoods-goals-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: wriwoods-modal-slide 0.3s ease;
}

/* Close Button */
.wriwoods-goals-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Sections */
.wriwoods-goals-section {
    margin-bottom: 20px;
}

.wriwoods-goals-section h3 {
    margin-bottom: 10px;
}

/* Active Goals List */
#wriwoods-goals-list {
    list-style: none;
    padding-left: 0;
}

/* Add Goal Form */
#wriwoods-goals-form input,
#wriwoods-goals-form select {
    width: calc(100% - 20px);
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Hide form container on load */
#wriwoods-goals-form-container {
    display: none;
}

.wriwoods-goals-submit {
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.wriwoods-goals-submit:hover {
    background-color: #43a047;
}

/* Modal Animation */
@keyframes wriwoods-modal-slide {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Modal content */
.wriwoods-goals-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Goals list */
#wriwoods-goals-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

/********* SINGLE GOAL **********/

/* Goals List Items */
#wriwoods-goals-list li.wriwoods-goals-item {
    display: flex;
    align-items: center;
    background: #fff; /* White card background */
    border-radius: 12px;
    border: 1px solid #E7E9EC;
    padding: 12px 16px;
    margin-bottom: 10px;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

/* Hover effect */
#wriwoods-goals-list li.wriwoods-goals-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Icon */
.wriwoods-goals-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

/* Content */
.wriwoods-goals-content {
    display: flex;
    flex-direction: column;      /* stack title and progress vertically */
}

/* Add a goal - ghost goal */
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost {
    background-color: #E7E9EC;
    cursor: pointer;
}
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost:hover {
    box-shadow: none;
}
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost .wriwoods-goals-icon,
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost .wriwoods-goals-title {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost:hover .wriwoods-goals-icon,
#wriwoods-goals-list li.wriwoods-goals-item.wriwoods-goals-ghost:hover .wriwoods-goals-title {
    opacity: 0.8;
}

/* Completed goals */
#wriwoods-goals-list li.complete {
    border-color: #A0E6A0;
    background: #F0FFF0;
}

/* Title and frequency container */
.wriwoods-goals-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.wriwoods-goals-frequency {
    font-size: 0.85rem;
    color: #888;
}

/* Progress text */
.wriwoods-goals-progress {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

/* Optional: inline progress bar below each goal */
.wriwoods-goals-progress-bar {
    height: 6px;
    border-radius: 3px;
    background: #E7E9EC;
    margin-top: 4px;
    overflow: hidden;
}

.wriwoods-goals-progress-bar-inner {
    height: 100%;
    background: #4CAF50; /* green for progress */
    width: 0%; /* dynamically set with JS */
    transition: width 0.3s ease;
}

/* Float checkmark to the right */
.wriwoods-goals-manage {
    margin-left: auto;
    margin-right: 20px;
}

/* Float checkmark to the right */
.wriwoods-goals-checkmark {
    font-size: 40px;
    cursor: pointer;
    color: #ccc;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 40px;
}

.wriwoods-goals-item.complete .wriwoods-goals-checkmark {
    color: #4CAF50; /* green when completed */
}

.wriwoods-goals-checkmark:hover {
    color: #4CAF50;
}

/* Edit and delete */
.wriwoods-goals-edit,
.wriwoods-goals-delete {
    cursor: pointer;
    margin-left: 8px;
    color: #888;
    transition: color 0.2s, opacity 0.3s;
    opacity: 0;
}
.wriwoods-goals-edit:hover { color: #4caf50; }
.wriwoods-goals-delete:hover { color: #e53935; }

#wriwoods-goals-list li.wriwoods-goals-item:hover .wriwoods-goals-delete,
#wriwoods-goals-list li.wriwoods-goals-item:hover .wriwoods-goals-edit {
    opacity: 1;
}


/* Pop animation */
@keyframes wriwoods-pop {
    0%   { transform: scale(0.8); opacity: 0; }
    50%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.wriwoods-goals-item.pop {
    animation: wriwoods-pop 0.3s ease forwards;
}

/* Smooth move */
/* Add to your CSS */
.wriwoods-goals-item {
    transition: transform 0.3s ease, box-shadow 0.2s ease;
    position: relative; /* Needed for smooth slide */
}

.pop {
    transform: scale(1.15);
}

/********* ADD GOAL FORM **********/

/* Form rows */
.wriwoods-goals-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* Inputs & select */
#wriwoods-goals-form input,
#wriwoods-goals-form select {
    flex: 1;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Emoji input smaller and centered */
#wriwoods-goals-form #wriwoods-goal-icon {
    flex: 0 0 40px !important;   /* override flex:1 */
    text-align: center;
    padding: 6px 4px;
    font-size: 18px;
}

/* Submit button */
.wriwoods-goals-submit {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.wriwoods-goals-submit:hover {
    background: #45a049;
}