/* Form Components */

/* Service Selection Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.service-btn img,
.service-btn svg {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.service-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.service-btn.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.service-btn span {
    text-align: center;
    line-height: 1.2;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Modern Input Styles */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.25rem;
    z-index: 1;
    pointer-events: none;
}

.textarea-wrapper .input-icon {
    top: 1rem;
    align-self: flex-start;
}

.form-input-modern,
.form-textarea-modern,
.form-select-modern {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    text-align: left;
}

.form-textarea-modern {
    min-height: 120px;
    resize: vertical;
    padding: 1rem;
    text-align: left;
}

.form-input-modern:focus,
.form-textarea-modern:focus,
.form-select-modern:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 0 20px rgba(99, 102, 241, 0.3);
}

.form-input-modern::placeholder,
.form-textarea-modern::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-select-modern {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-select-modern option {
    background: var(--bg-darker);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-input-wrapper .form-input-modern {
    flex: 1;
    padding-right: 3.5rem;
    padding-left: 1rem;
}

.btn-icon-modern {
    position: absolute;
    right: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border);
    padding: 0.625rem;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.btn-icon-modern:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.btn-icon-modern.btn-generate {
    right: 3.5rem;
}

/* Toggle Password Button (Eye Icon) */
.btn-toggle-password {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.btn-toggle-password .icon-eye {
    transition: all 0.3s ease;
}

.password-field[type="text"] ~ .btn-toggle-password .icon-eye {
    opacity: 0.5;
}

/* 13-14" Laptop optimization */
@media (max-width: 1440px) {
    .form-container {
        max-width: 600px;
    }
    
    .service-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.875rem;
    }
}

@media (max-width: 1366px) {
    .form-container {
        max-width: 550px;
    }
    
    .service-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .service-btn {
        padding: 1rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}
