/* File: css/weight-popup.css */

/* Weight Popup Container */
#weight-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 2rem !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    animation: slideUp 0.4s ease-out !important;
}

/* Header */
#weight-container h3 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1.5rem !important;
}

/* Weight Graph Container */
#weight-container .mb-6 {
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
    background: #f9fafb !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    max-width: 800px !important; /* Increased max-width for larger graph */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Canvas Styling */
#weight-container canvas {
    width: 100% !important;
    height: 300px !important; /* Matches the HTML height attribute */
    max-height: 400px !important; /* Allows some flexibility */
}

/* Weight Content */
.weight-content {
    margin-top: 1.5rem !important;
}

/* Weight Record Card */
.weight-record {
    border-radius: 0.75rem !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    background: #f9fafb !important;
}

.weight-record:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Record Text */
.weight-record p {
    margin: 0 !important;
    color: #374151 !important;
    font-size: 1rem !important;
}

.weight-record .text-sm {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
}

/* Buttons in Record */
.weight-record button {
    padding: 0.5rem !important;
    border-radius: 9999px !important;
    transition: all 0.2s ease !important;
}

.weight-record button:hover {
    transform: scale(1.1) !important;
}

/* Add Weight Button */
.add-weight-btn {
    background: #3b82f6 !important;
    color: #ffffff !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
    margin-top: 1.5rem !important;
}

.add-weight-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Add/Edit Popup */
#add-edit-weight-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 2rem !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    animation: slideUp 0.4s ease-out !important;
}

#add-edit-weight-container h3 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1.5rem !important;
}

/* Form Fields */
#add-edit-weight-container label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

#add-edit-weight-container input,
#add-edit-weight-container textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    background: #f9fafb !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

#add-edit-weight-container input:focus,
#add-edit-weight-container textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    outline: none !important;
}

/* Save Button */
#add-edit-weight-container button[type="submit"] {
    background: #3b82f6 !important;
    color: #ffffff !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

#add-edit-weight-container button[type="submit"]:hover {
    background: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0 !important;
        transform: translateY(20px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}