/* Import Square's preferred font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #1f1f1f;
}

header {
    background: #ffffff;
    color: #1f1f1f;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
}

main {
    padding: 20px;
    margin: 20px auto;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    color: #6b7177;
}

h1, h2, h3, h4 {
    color: #1f1f1f;
    margin-top: 0;
    font-weight: 600;
}

h2 { 
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h3 { 
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Container and layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* How it works section */
.how-it-works {
    margin: 60px 0;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 32px 0;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e6e6e6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.step-number {
    background: #006aff;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex-grow: 1;
}

.step-content h4 {
    margin: 0 0 12px 0;
    color: #1f1f1f;
    font-size: 1.25rem;
}

.step-content p {
    margin: 0;
    color: #6b7177;
    font-size: 1rem;
}

/* Features section */
.features {
    background: #f7f7f7;
    padding: 32px;
    border-radius: 12px;
    margin: 48px 0;
}

.features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features li {
    padding: 16px 0;
    border-bottom: 1px solid #e6e6e6;
    color: #1f1f1f;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* Forms */
.registration-form, .unsubscribe-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin: 48px 0;
    border: 1px solid #e6e6e6;
}

.unsubscribe-form {
    background: #fff5f5;
    border-color: #fee2e2;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1f1f1f;
    font-size: 0.9375rem;
}

.form-group input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 1rem;
    color: #1f1f1f;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-group input:hover {
    border-color: #d1d5db;
}

.form-group input:focus {
    outline: none;
    border-color: #006aff;
    box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.1);
}

.help-text {
    display: block;
    margin-top: 8px;
    color: #6b7177;
    font-size: 0.875rem;
}

/* Buttons */
.button-primary {
    background: #006aff;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.button-primary:hover {
    background: #0055cc;
    transform: translateY(-1px);
}

.button-danger {
    background: #dc2626;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.button-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Status messages */
.status-message {
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
    font-weight: 500;
}

.status-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Summary display */
.summary {
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    margin: 24px 0;
    border: 1px solid #e6e6e6;
}

.newsletter-list {
    margin-top: 24px;
}

.newsletter-item {
    margin-bottom: 16px;
    padding: 16px;
    background: #f7f7f7;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .step {
        flex-direction: column;
        padding: 24px;
    }
    
    .registration-form, .unsubscribe-form {
        padding: 24px;
    }
    
    .button-primary, .button-danger {
        width: 100%;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Summary Length Options */
.summary-length-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: #006aff;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e6e6e6;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #006aff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #006aff;
}

.radio-content {
    display: flex;
    flex-direction: column;
}

.radio-content strong {
    color: #1f1f1f;
    font-size: 1rem;
}

.radio-content small {
    color: #6b7177;
    font-size: 0.875rem;
}

/* Summary Mode Toggle */
.summary-mode-toggle {
    display: flex;
    gap: 1px;
    background: #e6e6e6;
    padding: 2px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mode-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f5f5f5;
    color: #6b7177;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-button:first-child {
    border-radius: 6px 0 0 6px;
}

.mode-button:last-child {
    border-radius: 0 6px 6px 0;
}

.mode-button.active {
    background: #006aff;
    color: white;
}

/* Time Slider Styles */
.time-slider-container {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 2px solid #e6e6e6;
}

.time-slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #1f1f1f;
}

.word-count {
    color: #6b7177;
    font-size: 0.9em;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e6e6e6;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #006aff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.time-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #6b7177;
    font-size: 0.8em;
}

/* Additional Email Styles */
.additional-email-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.additional-email {
    flex-grow: 1;
}

.remove-email {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.remove-email:hover {
    background: #cc0000;
}

.button-secondary {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
}

.button-secondary:hover {
    background: #e0e0e0;
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.message.error {
    background-color: #ffe6e6;
    border: 1px solid #ffb3b3;
    color: #cc0000;
}

.message.success {
    background-color: #e6ffe6;
    border: 1px solid #b3ffb3;
    color: #006600;
}

.message.update {
    background-color: #e6f3ff;
    border: 1px solid #b3d9ff;
    color: #004d99;
}