/**
 * PurpleVote Donation Page Styles
 * Defines the split layout, grid, and custom button colors.
 */

/* Main Container Padding to keep content off the boundaries */
.pv-donation-container {
    padding: 2rem; /* Adds uniform spacing (approx 32px) around all content */
    box-sizing: border-box; /* Ensures the padding doesn't force the container to break the page width */
}

/* Main flex container to split left (image) and right (form) */
.pv-donate-split {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

/* Image container (Left Side) */
.pv-donate-image {
    flex: 1 1 300px;
    /* Restricting the flex column to 400px so it hugs the resized image and prevents dead space */
    max-width: 400px; 
}

.pv-donate-image img {
    width: 100%;
    height: auto;
    border-radius: 8px; /* Optional slight rounding */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Form container (Right Side) */
.pv-donate-form-wrapper {
    flex: 2 1 400px; 
}

/* Grid for the 5 preset buttons and the custom input wrapper */
.pv-donate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns across */
    gap: 15px;
    margin-bottom: 1.5rem;
}

/* Styling for the 5 preset purple buttons */
.preset-btn {
    background-color: #a933d5; /* Primary requested purple */
    color: #ffffff;
    border: none;
    padding: 15px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.preset-btn:hover {
    background-color: #9370db; /* Lighter purple hover state */
}

.preset-btn:active {
    transform: scale(0.98);
}

/* 6th Grid Item: Wrapper for label and custom input */
.custom-amount-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
}

.custom-amount-wrapper label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #333;
    font-weight: bold;
    text-align: center;
}

/* Custom Input Field with green border and static $ sign */
.input-prefix {
    display: flex;
    align-items: center;
    border: 2px solid green; /* Requested green border */
    border-radius: 4px;
    background: #fff;
    padding: 0 10px;
    height: 52px; 
    box-sizing: border-box;
}

.currency-symbol {
    font-weight: bold;
    color: #333;
    margin-right: 5px;
    font-size: 1.1rem;
}

.input-prefix input {
    border: none !important;
    background: transparent;
    width: 100%;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: none !important;
    outline: none !important;
    -moz-appearance: textfield; 
}

/* Hides default up/down arrows in Chrome/Safari */
.input-prefix input::-webkit-outer-spin-button,
.input-prefix input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* The Main Donate Submit Button */
/* I inverted the colors from the preset buttons so this stands out as the final action */
.pv-submit-donate {
    background-color: #9370db !important; 
    color: #ffffff !important; 
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.2s ease;
}

.pv-submit-donate:hover {
    background-color: #a933d5 !important;
}

/* Tax Disclaimer Text */
.pv-donate-tax-disclaimer {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-top: 0;
}

/* Contributor Name Field */
.pv-contributor-wrapper {
    margin-bottom: 1.5rem;
    text-align: left;
}

.pv-contributor-wrapper label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.pv-contributor-desc {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Base styling for the text input */
.pv-contributor-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

/* Purple highlight border when the user focuses/clicks on the input */
.pv-contributor-wrapper input[type="text"]:focus {
    border-color: #a933d5; 
}