/* Individual recipe page styles */
.recipe-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.recipe-header {
    text-align: center;
    margin-bottom: 3rem;
}

.recipe-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.recipe-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.recipe-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.recipe-time, .recipe-servings {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.serving-calculator {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    margin-bottom: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.serving-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.serving-calculator-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.serving-toggle-btn {
    background: #3B82F6;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.serving-toggle-btn:hover {
    background: #1E3A8A;
    transform: scale(1.1);
}

.serving-calculator.minimised {
    padding: 1rem 2rem;
}

.serving-calculator.minimised .serving-input,
.serving-calculator.minimised .measurement-toggle,
.serving-calculator.minimised .keepalive-section {
    display: none;
}

.measurement-toggle {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.measurement-toggle h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Keepalive Section */
.keepalive-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.keepalive-btn {
    background: linear-gradient(135deg, #3B82F6 0%, #1E3A8A 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.keepalive-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.keepalive-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.keepalive-btn.active:hover {
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.keepalive-icon {
    font-size: 1.1rem;
}

.keepalive-text {
    font-weight: 500;
}

.keepalive-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3B82F6;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-labels {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.toggle-label {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.toggle-label.active {
    color: var(--text-primary);
    font-weight: 600;
}

.serving-calculator h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.serving-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.serving-input input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.serving-input input:focus {
    outline: none;
    border-color: #3B82F6;
}

.recipe-ingredients {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.recipe-ingredients h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.ingredients-list {
    list-style: none;
    margin-bottom: 2rem;
    columns: 2;
    column-gap: 2rem;
    break-inside: avoid;
}

.ingredients-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.ingredient-amount {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 3rem;
    flex-shrink: 0;
}

.ingredient-name {
    color: var(--text-secondary);
    flex: 1;
}

.recipe-instructions {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    border: 1px solid var(--border-color);
}

.recipe-instructions h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.recipe-instructions h4 {
    margin: 2rem 0 1rem 0;
    color: #3B82F6;
    font-size: 1.2rem;
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    counter-increment: step-counter;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 3rem;
}

.instructions-list li:last-child {
    border-bottom: none;
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 1rem;
    background: #3B82F6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.instructions-list ul {
    list-style: disc;
    margin: 0.5rem 0 0 1rem;
    counter-reset: none;
}

.instructions-list ul li {
    counter-increment: none;
    padding: 0.25rem 0;
    border-bottom: none;
    padding-left: 0;
    position: static;
}

.instructions-list ul li::before {
    display: none;
}

.recipe-tips {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.recipe-tips h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.recipe-tips ul {
    list-style: none;
}

.recipe-tips li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.recipe-tips li:last-child {
    border-bottom: none;
}

.recipe-tips li::before {
    content: "💡";
    margin-right: 0.5rem;
}

/* Responsive design for individual recipes */
@media screen and (max-width: 768px) {
    .serving-input {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ingredients-list {
        columns: 1;
    }
}
