/**
 * Take Action Page Styles
 * Styles for MP lookup tool, email templates, and action cards
 */

/* Hero Section */
.hero-simple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-simple h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-simple .hero-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Action Priority Section */
.action-priority {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.priority-badge {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.action-priority h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.action-buttons {
    margin: 1.5rem 0;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.action-note {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1rem;
}

/* MP Lookup Container */
.mp-lookup-container {
    max-width: 800px;
    margin: 2rem auto;
}

.mp-lookup-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.mp-lookup-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.postcode-input-wrapper {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

#postcode-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#postcode-input:focus {
    outline: none;
    border-color: #667eea;
}

#find-mp-btn {
    padding: 0.75rem 2rem;
    white-space: nowrap;
}

.input-note {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Loading State */
.mp-loading {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error State */
.mp-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.error-message {
    color: #721c24;
    font-weight: 600;
    margin: 0;
}

/* MP Result Card */
.mp-result {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mp-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-bottom: 2rem;
}

.mp-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mp-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
}

.mp-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.mp-party {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.25rem 0;
}

.mp-constituency {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0.25rem 0;
}

.mp-contact {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.mp-contact h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.mp-contact p {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.mp-contact a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.mp-contact a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* MP Position Badge */
.mp-position-badge {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mp-position-badge.position-against {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.mp-position-badge.position-for {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.mp-position-badge.position-uncertain {
    background: #e2e3e5;
    border: 2px solid #6c757d;
    color: #383d41;
}

.position-indicator {
    font-size: 1.2rem;
}

/* MP Position Details */
.mp-position-details {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.position-disclaimer {
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    margin-bottom: 1rem;
    border-radius: 4px;
    line-height: 1.6;
}

.disclaimer-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.position-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.position-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.position-item > strong {
    display: block;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 0.95rem;
    border-bottom: 1px solid #e9ecef;
}

.position-text-content {
    padding: 1rem;
    line-height: 1.6;
}

.position-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.position-status.status-for {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.position-status.status-against {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.position-status.status-uncertain {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.position-explanation {
    color: #555;
    line-height: 1.7;
}

/* Border accent colors */
.position-item.has-for {
    border-left: 4px solid #dc3545;
}

.position-item.has-against {
    border-left: 4px solid #28a745;
}

.position-item.has-uncertain {
    border-left: 4px solid #6c757d;
}

.position-updated {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* MP Research Section */
.mp-research {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.mp-research h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.research-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.research-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.research-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.research-link .link-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    min-width: 2rem;
    text-align: center;
}

.research-link .link-text {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Position Correction Link */
.position-correction-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.position-correction-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.mp-actions {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.mp-actions .btn {
    flex: 1;
    min-width: 180px;
    text-align: center;
}

/* Email Template */
.email-template {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 0.5s ease;
}

.email-template h4 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

/* Template Context Box */
.template-context {
    padding: 0.75rem 1rem;
    background: #e8f4f8;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.template-context strong {
    display: block;
    color: #0066cc;
    margin-bottom: 0.25rem;
}

.template-context p {
    margin: 0.5rem 0 0 0;
    color: #333;
    line-height: 1.5;
}

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

.template-box {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.template-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.template-label {
    font-weight: 600;
    color: #2c3e50;
}

#template-subject {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.template-body {
    position: relative;
}

#template-body {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.1s;
    font-weight: 600;
}

.copy-btn:hover {
    background: #764ba2;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #28a745;
}

.template-body .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.template-tip {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 1rem;
}

/* Template Reminder */
.template-reminder {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.template-reminder strong {
    color: #856404;
}

.personalization-prompts {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ffc107;
}

.personalization-prompts p {
    margin-bottom: 0.5rem;
    color: #856404;
}

.personalization-prompts ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.personalization-prompts li {
    margin-bottom: 0.4rem;
    color: #665c00;
    line-height: 1.5;
}

/* Template Warning (Respectful Conduct) */
.template-warning {
    background: #f8d7da;
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.template-warning strong {
    color: #721c24;
}

/* Share Center */
.share-center {
    text-align: center;
    margin: 2rem 0;
}

.social-share-large {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-share-large .share-btn {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    min-width: 200px;
    justify-content: center;
}

.social-share-large .share-btn span {
    font-weight: 600;
}

/* Pre-written Posts */
.pre-written-posts {
    max-width: 800px;
    margin: 3rem auto 0;
}

.pre-written-posts h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.post-templates {
    display: grid;
    gap: 1rem;
}

.post-template {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-text {
    flex: 1;
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
}

.post-template .copy-btn {
    white-space: nowrap;
}

/* More Actions Grid */
.more-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.action-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.action-card p {
    color: #555;
    line-height: 1.6;
}

/* CTA Final Section */
.cta-final {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta-final h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-final p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-final .btn {
    margin: 0 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-simple h1 {
        font-size: 1.8rem;
    }

    .hero-simple .hero-description {
        font-size: 1rem;
    }

    .postcode-input-wrapper {
        flex-direction: column;
    }

    #find-mp-btn {
        width: 100%;
    }

    .mp-header {
        flex-direction: column;
        text-align: center;
    }

    .mp-actions {
        flex-direction: column;
    }

    .mp-actions .btn {
        width: 100%;
    }

    .post-template {
        flex-direction: column;
        text-align: center;
    }

    .post-template .copy-btn {
        width: 100%;
    }

    .social-share-large .share-btn {
        min-width: auto;
        width: 100%;
    }

    .cta-final .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-simple {
        padding: 2rem 0;
    }

    .action-priority {
        padding: 1.5rem;
    }

    .mp-lookup-form {
        padding: 1.5rem;
    }

    .mp-card {
        margin-bottom: 1rem;
    }

    .mp-header {
        padding: 1.5rem;
    }

    .mp-photo {
        width: 100px;
        height: 100px;
    }

    .mp-info h3 {
        font-size: 1.4rem;
    }

    .email-template {
        padding: 1.5rem;
    }

    .more-actions-grid {
        grid-template-columns: 1fr;
    }
}
