/* Gravity Forms Button Form Block Styles */
:root {
    --button-color: #27ae60;
}

.gfbf-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Button Styles */
.gfbf-button {
    background: white;
    border: 3px solid var(--button-color);
    padding: 20px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.gfbf-button:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--button-color);
    transition: all 0.3s ease;
}

.gfbf-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.gfbf-button:hover:before {
    height: 100%;
    opacity: 0.1;
}

/* Button Variations */
.gfbf-style-rounded {
    border-radius: 12px;
}

.gfbf-style-square {
    border-radius: 0;
}

.gfbf-style-pill {
    border-radius: 50px;
}

/* Button Content */
.gfbf-button-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.gfbf-button-icon {
    width: 40px;
    height: 40px;
    background: var(--button-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.gfbf-button-text-wrapper {
    text-align: left;
    flex: 1;
}

.gfbf-button-text {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.gfbf-button-description {
    display: block;
    font-size: 14px;
    color: #666;
}

/* Modal Styles */
.gfbf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.gfbf-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.gfbf-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Animation Styles */
.gfbf-animation-fade .gfbf-modal-backdrop {
    animation: fadeIn 0.3s ease;
}

.gfbf-animation-fade .gfbf-modal-content {
    animation: fadeInScale 0.3s ease;
}

.gfbf-animation-slide .gfbf-modal-content {
    animation: slideInUp 0.3s ease;
}

.gfbf-animation-zoom .gfbf-modal-content {
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Close Button */
.gfbf-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.gfbf-close-button:hover {
    background: rgba(0,0,0,0.1);
}

/* Modal Header */
.gfbf-modal-header {
    padding: 30px 30px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 30px;
}

.gfbf-modal-title {
    font-size: 28px;
    color: #333;
    margin: 0 0 20px 0;
    font-weight: 600;
}

/* Modal Body */
.gfbf-modal-body {
    padding: 0 30px 30px;
}

/* Gravity Forms Styling */
.gfbf-modal .gfield {
    margin-bottom: 20px;
}

.gfbf-modal .gfield_label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.gfbf-modal input[type="text"],
.gfbf-modal input[type="email"],
.gfbf-modal input[type="tel"],
.gfbf-modal textarea,
.gfbf-modal select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.gfbf-modal input:focus,
.gfbf-modal textarea:focus,
.gfbf-modal select:focus {
    outline: none;
    border-color: var(--button-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.gfbf-modal .gform_button {
    background: var(--button-color);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.gfbf-modal .gform_button:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Success Message */
.gfbf-modal .gform_confirmation_message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .gfbf-button {
        max-width: 100%;
    }
    
    .gfbf-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .gfbf-modal-header,
    .gfbf-modal-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .gfbf-button-text {
        font-size: 18px;
    }
}

/* Modal Closing Animation */
.gfbf-modal.closing .gfbf-modal-backdrop {
    animation: fadeOut 0.3s ease;
}

.gfbf-modal.closing .gfbf-modal-content {
    animation: fadeOutScale 0.3s ease;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}