/* components.css - רכיבי ממשק */

/* Date Type Toggle Styles */
.date-type-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(78, 205, 196, 0.1);
    border-radius: var(--border-radius-sm);
    border: 2px solid rgba(78, 205, 196, 0.2);
}

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

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

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    transition: var(--transition);
    border-radius: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    right: 4px;
    bottom: 4px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

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

.toggle-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.toggle-text.left {
    left: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-text.right {
    right: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

input:checked + .toggle-slider .toggle-text.left {
    opacity: 1;
}

input:checked + .toggle-slider .toggle-text.right {
    opacity: 0;
}

/* More Button Styles */
.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
    color: white;
    padding: 8px var(--spacing-md);
    font-size: var(--font-size-sm);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Checkbox Styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(78, 205, 196, 0.1);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
}

/* Tips Styles */
.tips-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    width: 100%;
}

.tip-card {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
    text-align: right;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tip-card:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
    animation: tipCardBounce 0.4s ease-out;
}

.tip-card.animate {
    opacity: 1;
    transform: translateX(0);
    animation: tipSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.tip-card.animate:nth-child(1) { 
    animation-delay: 0.1s; 
}
.tip-card.animate:nth-child(2) { 
    animation-delay: 0.2s; 
}
.tip-card.animate:nth-child(3) { 
    animation-delay: 0.3s; 
}
.tip-card.animate:nth-child(4) { 
    animation-delay: 0.4s; 
}

/* אנימציות חדשות לטיפים */
@keyframes tipSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes tipCardBounce {
    0% { transform: translateY(-3px) scale(1.02); }
    50% { transform: translateY(-5px) scale(1.03); }
    100% { transform: translateY(-3px) scale(1.02); }
}

.no-transform .tip-card {
    opacity: 1;
    transform: none;
}

.tip-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 35px;
    text-align: center;
}

.tip-content {
    flex: 1;
}

.tip-content h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-content p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Alert Styles */
.alert {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 2px solid rgba(231, 76, 60, 0.3);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
    text-align: center;
    animation: shake 0.5s ease-in-out;
    animation-delay: 0.5s;
}

.alert.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: rgba(46, 204, 113, 0.3);
}

/* Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.current-date {
    background: rgba(78, 205, 196, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    border: 2px solid rgba(78, 205, 196, 0.3);
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.current-date h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.current-date p {
    font-size: var(--font-size-md);
    color: var(--primary-color);
    font-weight: 600;
}

.preview-icon {
    font-size: 4em;
    margin-bottom: var(--spacing-lg);
    opacity: 0.3;
}

.preview-text {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.preview-description {
    font-size: 0.95em;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Focus styles for accessibility */
.focused {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Field error styles */
.field-error {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    max-width: 300px;
    font-weight: 500;
}

.notification-success {
    background: #27ae60;
}

.notification-error {
    background: #e74c3c;
}

.notification-info {
    background: #3498db;
}

/* Responsive adjustments for components */
@media (max-width: 768px) {
    /* Date type toggle mobile */
    .date-type-toggle-wrapper {
        /*flex-direction: column;*/
        gap: 8px;
        text-align: center;
        padding: 12px;
    }
    
    .toggle-label {
        font-size: 0.9em;
    }
    
    .toggle-switch {
        width: 70px;
        height: 35px;
        /*margin: 0 auto;*/
    }
    
    .toggle-slider:before {
        height: 27px;
        width: 27px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(-35px);
    }
    
    .toggle-text {
        font-size: 9px;
    }
    
    /* Tips major mobile fix */
    .tips-container {
        gap: 8px;
        margin: 15px 0;
    }
    
    .tip-card {
        padding: 10px;
        gap: 8px;
        flex-direction: column;
        text-align: center;
        border-radius: 10px;
        margin: 0;
        min-height: auto;
    }
    
    .tip-icon {
        font-size: 1.8em;
        width: auto;
        margin-bottom: 5px;
        align-self: center;
    }
    
    .tip-content {
        text-align: center;
        width: 100%;
    }
    
    .tip-content h4 {
        font-size: 0.9em;
        margin-bottom: 3px;
        font-weight: 600;
    }
    
    .tip-content p {
        font-size: 0.8em;
        line-height: 1.3;
        margin: 0;
    }
    
    /* Checkbox mobile */
    .checkbox-wrapper {
        /*flex-direction: column;*/
        gap: 8px;
        text-align: center;
        padding: 12px;
    }
    
    .checkbox-wrapper input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .checkbox-wrapper label {
        font-size: 0.9em;
        text-align: center;
    }
    
    /* Current date mobile */
    .current-date {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .current-date h3 {
        font-size: 1em;
        margin-bottom: 5px;
    }
    
    .current-date p {
        font-size: 1em;
    }
    
    .preview-icon {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    .preview-text {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .preview-description {
        font-size: 0.85em;
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    /* Alert mobile */
    .alert {
        padding: 12px 15px;
        font-size: 0.9em;
        margin-bottom: 15px;
        border-radius: 10px;
    }
}a24 100%);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
    color: white;
    padding: 8px var(--spacing-md);
    font-size: var(--font-size-sm);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Checkbox Styles */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(78, 205, 196, 0.1);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
}

/* Tips Styles */
.tips-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    width: 100%;
}

.tip-card {
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
    text-align: right;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tip-card:hover {
    background: rgba(78, 205, 196, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.tip-card.animate {
    opacity: 1;
    transform: translateX(0);
}

.tip-card.animate:nth-child(1) { transition-delay: 0.1s; }
.tip-card.animate:nth-child(2) { transition-delay: 0.2s; }
.tip-card.animate:nth-child(3) { transition-delay: 0.3s; }
.tip-card.animate:nth-child(4) { transition-delay: 0.4s; }

.no-transform .tip-card {
    opacity: 1;
    transform: none;
}

.tip-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 35px;
    text-align: center;
}

.tip-content {
    flex: 1;
}

.tip-content h4 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-content p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Alert Styles */
.alert {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 2px solid rgba(231, 76, 60, 0.3);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
    text-align: center;
    animation: shake 0.5s ease-in-out;
    animation-delay: 0.5s;
}

.alert.success {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: rgba(46, 204, 113, 0.3);
}

/* Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.current-date {
    background: rgba(78, 205, 196, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    border: 2px solid rgba(78, 205, 196, 0.3);
    width: 100%;
}

.current-date h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.current-date p {
    font-size: var(--font-size-md);
    color: var(--primary-color);
    font-weight: 600;
}

.preview-icon {
    font-size: 4em;
    margin-bottom: var(--spacing-lg);
    opacity: 0.3;
}

.preview-text {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.preview-description {
    font-size: 0.95em;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}