/* Custom CSS for Admin Panel Variant Screen */

/* Page heading */
.page_heading {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 24px;
}

/* Make the entire variant block a nice clean card */
.add_product_varients__content__items {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    
    /* Use Grid to perfectly align items regardless of label height */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: end; /* Aligns all .item_desc to the bottom of the grid row */
}

/* Field descriptors (labels + inputs) */
.add_product_varients__content__items__item_desc {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.add_product_varients__content__items__item_desc label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    width: 100%;
}

/* Secondary label text */
.add_product_varients__content__items__item_desc label span {
    font-size: 12px;
    color: #888;
    font-weight: 400;
    display: block; /* ensures it goes to a new line */
    margin-top: 2px;
}

/* ALL Inputs inside the item container */
.add_product_varients__content__items input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: transparent !important; /* Made transparent per user request */
    box-sizing: border-box;
    transition: all 0.2s ease;
    height: 42px;
    margin: 0;
}

.add_product_varients__content__items input:focus {
    border-color: #ff4d4f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.15);
}

/* FLAVOR REPEATER ROW - Force it to be a 100% width block */
.add_product_varients__content__items__item_desc:has(label[for="flavor"]) {
    grid-column: 1 / -1; /* Span all 4 columns */
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; /* Allows inner inputs to wrap if window is small */
    align-items: flex-end;
    gap: 15px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px dashed #eaeaea; /* visually separate repeaters */
}

/* For flavor labels specifically, keep the delete icon nicely spaced */
.add_product_varients__content__items__item_desc label[for="flavor"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Force the inputs to the next row */
    margin-bottom: 5px;
}

.add_product_varients__content__items__item_desc label[for="flavor"] svg {
    cursor: pointer;
    color: #ff4d4f;
    transition: transform 0.2s;
    width: 18px;
    height: 18px;
}

.add_product_varients__content__items__item_desc label[for="flavor"] svg:hover {
    transform: scale(1.1);
}

/* The actual inputs next to the Flavor label */
.add_product_varients__content__items__item_desc:has(label[for="flavor"]) input {
    flex: 1 1 0; /* Perfectly distribute space equally among the 5 inputs */
    min-width: 100px;
}

/* Action Buttons within the variant card */
.add_product_varients__content__items > button.button-red {
    grid-column: span 2; /* 2 buttons, each take 2 columns in a 4 col grid */
    height: 42px; /* Match input height */
    padding: 0 24px;
    border-radius: 6px;
    background: #ff4d4f;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.add_product_varients__content__items > button.button-red:hover {
    background: #ff7875;
}

/* The second button is actually "Delete" (for the entire variant) */
.add_product_varients__content__items > button.button-red:last-child {
    background: transparent;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
}

.add_product_varients__content__items > button.button-red:last-child:hover {
    background: #fff0f0;
}

/* Add more variant button */
button.button-border-red {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px;
    border: 2px dashed #ff4d4f;
    background: transparent; /* Made transparent */
    color: #ff4d4f;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

button.button-border-red:hover {
    background: #ff4d4f;
    color: white;
}

/* Footer layout */
.add_product_varients__content__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eaeaea;
    padding-top: 24px;
    margin-top: 24px;
    padding-bottom: 40px;
}

.add_product_varients__content__footer__back {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 16px;
}

.add_product_varients__content__footer .button-red {
    background: #ff4d4f;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add_product_varients__content__footer .button-red:hover {
    background: #d9363e;
}

/* Hide the old horizontal rules since we use cards now */
.add_product_varients__content hr {
    display: none;
}
